Hi Guys,
at first i have to say that i'm a Beginner at Android and Kotlin.
I'm working on a lets say learn App for children. The kids can learn several Parts with Videos. My employer wants that the Videos are all offline.
So i decided to programm a InstallTimeDelivery, so after the App got downloaded, it will download the media. If i got it right.
I made a extra Module, the Media is stored in Ressource/raw of the module.
The code to access the files looks like this:
Do i only have to adjust the packageName?
Thanks for your help and time!!!
Zohan3456
at first i have to say that i'm a Beginner at Android and Kotlin.
I'm working on a lets say learn App for children. The kids can learn several Parts with Videos. My employer wants that the Videos are all offline.
So i decided to programm a InstallTimeDelivery, so after the App got downloaded, it will download the media. If i got it right.
I made a extra Module, the Media is stored in Ressource/raw of the module.
The code to access the files looks like this:
BtnKnot2.setOnClickListener {
offlineUri = "android.resource://$packageName/${R.raw.rechterknoten}"
val intent = Intent(this,VideoScreen::class.java)
intent.putExtra("Uri", offlineUri)
startActivity(intent)
}
offlineUri = "android.resource://$packageName/${R.raw.rechterknoten}"
val intent = Intent(this,VideoScreen::class.java)
intent.putExtra("Uri", offlineUri)
startActivity(intent)
}
Do i only have to adjust the packageName?
Thanks for your help and time!!!
Zohan3456