2

Lot of questions raised in stackoverflow itself for this error and none of them really solves the issue. setDataSource failed: status = 0x80000000 for MediaMetadataRetriever. Android 7,9,10 are working perfectly. I'm having issue with android 8 only. tested in Samsung j5 prime. using xamarin.forms version 4.8.0.1821.all permissions given as well.

MediaMetadataRetriever retriever = new MediaMetadataRetriever();
retriever.SetDataSource(filePath);
string time = retriever.ExtractMetadata(MetadataKey.Duration);
long ms = Java.Lang.Long.ParseLong(time);
                

{Java.Lang.RuntimeException: setDataSource failed: status = 0x80000000
  at Java.Interop.JniEnvironment+InstanceMethods.CallVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0006e] in <42748fcc36b74733af2d9940a8f3cc8e>:0 
  at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0002a] in <42748fcc36b74733af2d9940a8f3cc8e>:0 
  at Android.Media.MediaMetadataRetriever.SetDataSource (System.String path) [0x00029] in <7d2292394f8c488b97f5bc2a0ac0240d>:0 
  --- End of managed Java.Lang.RuntimeException stack trace ---
java.lang.RuntimeException: setDataSource failed: status = 0x80000000
    at android.media.MediaMetadataRetriever.setDataSource(Native Method)
    at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:78)
Dev
  • 315
  • 2
  • 16
  • 1
    Make sure you update the mobile device Kernel. You most likely are having an issue with TLS and the old kernel doesn't support the version of TLS being used. – jdweng Mar 12 '21 at 13:42

0 Answers0