Xamarin CrossMediaManager

0

I am currently trying to utilize the Xamarin CrossMediaManager but there seems to be a problem regarding reading source from the apps internal storage. The source i'm trying to access is : /data/user/0/com.pickle.solenya/files/video/180724-084223550.mp4 This is my app package, and the location is an internal one.

I have tried a with a android content provider and accessing the file from files:// and content:// but without success.

The file does exist, and i have tried with other files, the file is found but the MediaPlayer either returns E/MediaPlayer(12941): Error (-38,0) or throws java.io.IOException: setDataSourceFD failed.: status=0x80000000 | SecurityException

More details around the thrown exceptions:

Couldn't open content://com.pickle.jaguar/video/180724-084223550.mp4: java.io.IOException: setDataSourceFD failed.: status=0x80000000
07-24 14:21:47.367 D/MediaPlayer(10784): setDataSource IOException | SecurityException happend : 
07-24 14:21:47.367 D/MediaPlayer(10784): java.io.IOException: setDataSourceFD failed.: status=0x80000000

Requesting the following permissions at app start:

  • android.permission.RECORD_AUDIO
  • android.permission.CAMERA
  • android.permission.INTERNET
  • android.permission.READ_EXTERNAL_STORAGE
  • android.permission.WRITE_EXTERNAL_STORAGE
  • android.permission.ACCESS_WIFI_STATE
  • android.permission.MEDIA_CONTENT_CONTROL
  • android.permission.WAKE_LOCK
android
xamarin
xamarin.forms
xamarin.android
android-mediaplayer
asked on Stack Overflow Jul 24, 2018 by SlyOtis • edited Jul 24, 2018 by SlyOtis

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0