java.lang.IllegalArgumentException: MIME type video/mp4 cannot be inserted into content://media/external/images/media; expected MIME type under image/*
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:172)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
at android.content.ContentProviderProxy.insert(ContentProviderNative.java:549)
at android.content.ContentResolver.insert(ContentResolver.java:2149)
at android.content.ContentResolver.insert(ContentResolver.java:2111)
at com.google.modernstorage.storage.AndroidFileSystem.createMediaStoreUri(AndroidFileSystem.kt:425)
at com.google.modernstorage.sample.mediastore.MediaStoreViewModel$addMedia$1.invokeSuspend(MediaStoreViewModel.kt:76)
It seems to fix the error you need to change the following:
in MediaStoreViewModel
change field "Collection"
For video ->
Hi!
Describe the bug
Crash app
To Reproduce
Steps to reproduce the behavior:
It seems to fix the error you need to change the following: in
MediaStoreViewModel
change field "Collection" For video ->For Audio ->