@Guichaguri This component still not working on android 5.0.1 (Huawei P8 Lite)
When we use TrackPlayer in a page and navigate to that page my app closed without any error. (I also check log-android output many times)
Have you any plan to fix it? :disappointed:
Maybe related: #100, #125 and https://github.com/tanguyantoine/react-native-music-control/pull/129/files
I also try @ariona notes to fix this by change this line:
https://github.com/react-native-kit/react-native-track-player/blob/b096fa7bddf0b65da42c86d75016a66ad25f3d9e/android/src/main/java/guichaguri/trackplayer/metadata/Metadata.java#L119
to
if (android.os.Build.VERSION.SDK_INT > 19) {
md.putRating(MediaMetadataCompat.METADATA_KEY_RATING, track.rating);
}
But it's still not working.
Please help me to fix this.
@Guichaguri I test on another device with android 4.4 and my app force close there too :disappointed:
Can you send the full logcat?
@Guichaguri I finally find some useful log in logcat: :wink:
E/AndroidRuntime(17250): FATAL EXCEPTION: main
E/AndroidRuntime(17250): Process: com.mnlbox.mplayer, PID: 17250
E/AndroidRuntime(17250): android.app.RemoteServiceException: Bad notification posted from package com.mnlbox.mplayer: Couldn't expand RemoteViews for: StatusBarNotification(pkg=com.mnlbox.mplayer user=UserHandle{0} id=6402 tag=null score=0 key=0|com.mnlbox.mplayer|6402|null|10210: Notification(pri=0 contentView=com.mnlbox.mplayer/0x109007f vibrate=null sound=null defaults=0x0 flags=0x63 color=0x00000000 category=transport actions=1 vis=PUBLIC))
E/AndroidRuntime(17250): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1534)
E/AndroidRuntime(17250): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(17250): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(17250): at android.app.ActivityThread.main(ActivityThread.java:5538)
E/AndroidRuntime(17250): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(17250): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(17250): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
E/AndroidRuntime(17250): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
E/StatusBar( 3329): couldn't inflate view for notification com.mnlbox.mplayer/0x1902
E/StatusBar( 3329): android.widget.RemoteViews$ActionException: view: android.view.ViewStub doesn't have method: setTextColor(int)
E/StatusBar( 3329): at android.widget.RemoteViews.getMethod(RemoteViews.java:776)
E/StatusBar( 3329): at android.widget.RemoteViews.access$300(RemoteViews.java:75)
E/StatusBar( 3329): at android.widget.RemoteViews$ReflectionAction.apply(RemoteViews.java:1272)
E/StatusBar( 3329): at android.widget.RemoteViews.performApply(RemoteViews.java:2608)
E/StatusBar( 3329): at android.widget.RemoteViews.apply(RemoteViews.java:2568)
E/StatusBar( 3329): at com.android.systemui.statusbar.BaseStatusBar.inflateViews(BaseStatusBar.java:1325)
E/StatusBar( 3329): at com.android.systemui.statusbar.phone.HwPhoneStatusBar.inflateViews(HwPhoneStatusBar.java:809)
E/StatusBar( 3329): at com.android.systemui.statusbar.BaseStatusBar.inflateViews(BaseStatusBar.java:1260)
E/StatusBar( 3329): at com.android.systemui.statusbar.BaseStatusBar.addNotificationViews(BaseStatusBar.java:1551)
Is it useful? :thinking:
Maybe Related: #144
I am having the same issue on my Android 6.0.1 device. RN 0.48.4 and RNTP 0.2.1. It works smoothly on ios but crashes without any error on Android.
@Guichaguri any news about this?
Please help us to fix and use you module on more device and if not please introduce another alternative from react native community that use rather than you module.
Thanks man :wink:
The problem on the support library. We currently use the same version that react native uses. I started updating it in #165.
@Guichaguri Thanks man. It's a very good news.
Now my app crashed with above error on many devices. (Huawei with android 5, Lenovo with android 4.5, LG with android 6, ...)
For me the crash was causing due to another library which was also using exoplayer. I removed the other library and it worked fine.
Should be solved as part of v1.0.0
Most helpful comment
The problem on the support library. We currently use the same version that react native uses. I started updating it in #165.