cordova-file-plugin to download and store video files.
I store it using
this.file.dataDirectory + 'path/to/downloads/video.mp4'.
When I test this on an emulator with API 22 (=Android 5.1), my video player doesn’t seem to find the file. So I look for it using
adb shell run-as com.ionicframework.something cd files/path/to/downloads find video.mp4
root@generic_x86:/data/data/com.ionicframework.something/files/path/to/downloads $ find video.mp4 sh: find: not found
He finds the folders, but not the file… But the file has to be somewhere, because my app has increased in size with the same amount as the video size.
When I do the exact same thing using an emulator with API >=23, the file is found (and of course, my video player can play it):
generic_x86:/data/data/com.ionicframework.something/files/path/to/downloads $ find video.mp4 video.mp4
Notice that the word “root” is gone before “generic”. I don’t know why.
Is this a bug in the emulator? Or should I use something different than this.file.dataDirectory? According to the docs, API 22 should be supported.
shows the file. I guess the command find is not available with API 22. But why does my video player keeps saying the file is not found…?