Timber
Timber copied to clipboard
Not Working on Android 10 and up (Invalid column audio._id AS _id)
2021-04-06 15:31:01.163 30275-30275/naman14.timber E/AndroidRuntime: FATAL EXCEPTION: main
Process: naman14.timber, PID: 30275
java.lang.IllegalArgumentException: Invalid column audio._id AS _id
at android.os.Parcel.createExceptionOrNull(Parcel.java:2377)
at android.os.Parcel.createException(Parcel.java:2357)
at android.os.Parcel.readException(Parcel.java:2340)
at android.os.Parcel.readException(Parcel.java:2282)
at com.naman14.timber.ITimberService$Stub$Proxy.open(ITimberService.java:492)
at com.naman14.timber.MusicPlayer.playAll(MusicPlayer.java:487)
at com.naman14.timber.adapters.BaseSongAdapter.playAll(BaseSongAdapter.java:64)
at com.naman14.timber.adapters.SongsListAdapter$ItemHolder$1.run(SongsListAdapter.java:248)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Yes it is a big problem I tried to bypass it but I failed I used Access media files permission but I couldn't fix it this issue happened with me on another app and I fix it by adding access media files permission then it worked perfectly I think the problem is not here, it belongs to the permission of reading and writing the external storage permission. there is new updates on android 9 and above any body read the documentation of google play developers and grasp the solution.
Here is a shot to fix the problem https://stackoverflow.com/questions/58625949/how-to-get-access-to-external-storage-in-android-10-android-q any body check it and getback the summary
https://medium.com/android-news/handling-files-in-code-after-the-android-10-released-2bea0e16d35
I had a similar problem when working on my music player, I could not access all music files in android 10 or higher, this is how I fixed it.
` <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE />"
<permission android:name="android.permission.MEDIA_CONTENT_CONTROL" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />`
adding these helped
you can check pull requests i upload the fix