Appcelerator Studio - Android app crashes on Marshmallow when I upload a URL to a video player

I download the video from a remote server and save it in the application data directory. Once it is completed, I pass its URL to the video player (user interface element in my window). Then my application crashes.

This only happens on Marshmallow (Android version 6.0). I tested it on Lollypop (4-5 devices), but it works fine there.

I tried different solutions, but still can not solve this problem. It really kills me. If any of you have an idea about this, please help. I will be grateful.

This is my journal (from comments):

[ERROR]: TiVideoView8: java.io.IOException: setDataSource failed. [ERROR]: TiVideoView8: on android.media.MediaPlayer.setDataSource (MediaPlayer.java:1095) [ERROR]: TiVideoView8: on android.media.MediaPlayer.setDataSource (MediaPlayer.java:1041) [ERROR]: TiVideoView8: .media.MediaPlayer.setDataSource (MediaPlayer.java:987) [ERROR]: TiVideoView8: on android.media.MediaPlayer.setDataSource (MediaPlayer.java:968)

+6
source share
2 answers

You are facing TIMOB-20440 , which is fixed in Titanium 5.3 (beta this week, GA 2 weeks later).

+1
source

This is a bug that existed on the previous SDK allowance. But now fixed. The error occurred due to a new launch permission introduced in Andorid M. Fix version 5.3.0 or later. However, there is work. Obtain applicationDataDirectory permission using the ti.permission module.

0
source

All Articles