2

I have localized versions of a video I want to play in a VideoView but I'm having some issues figuring out how to properly play the localized version.

This answer tells me to localize a raw resource I should put the localized resources in raw-es.

This answer tells me that to use VideoView#setVideoUri I should create a uri for it like this:

Uri.parse("android.resource://${context.packageName}/${videoResId}")

(The above is Kotlin string interpolation.)

I can't seem to find any information about how to create a uri for the localized version, though. The uri created always references the default raw resource.

I can always just put both of them in the raw folder under different names and add some if checks, but I'd like to do it the correct way if possible.

Community
  • 1
  • 1
CorayThan
  • 17,174
  • 28
  • 113
  • 161

0 Answers0