I’m trying to allow the user of my app to select videos from their file library and then to save those videos to the apps documents directory. This is so that the app can control the videos’ playback without the user being able to access them (once they have been deleted). It’s a weird use case, but it’s part of an experiment.
I’ve tried using the network.download call to download the videos into the apps documents directory, but on Android I get the following error:
libcore.net.url.FileURLConnection cannot be cast to java.net.HttpURLConnection
The URL returned by media.selectVideo looks like file:///storage/emulated/0/Movies/wash-7-circles.mp4
I’m wondering if there’s anyway to achieve this or whether I need to go back to the drawing board. As said I want the app to be able to play videos which the user can not access (at least without rooting their phone). These videos will be generated by a separate program per user, so can’t be bundled in at build.