hive365 / BugReports

0 stars 0 forks source link

Notifications crash onStart() #14

Closed sleepy-evelyn closed 2 years ago

sleepy-evelyn commented 3 years ago

Stacktrace

Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getAction()' on a null object reference
       at com.hive365radio.android.radio.RadioPlayerService.handleNotificationAction(RadioPlayerService.java:314)
       at com.hive365radio.android.radio.RadioPlayerService.onStartCommand(RadioPlayerService.java:298)
       at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4298)
       at android.app.ActivityThread.access$2700(ActivityThread.java:273)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2070)
       at android.os.Handler.dispatchMessage(Handler.java:112)
       at android.os.Looper.loop(Looper.java:216)
       at android.app.ActivityThread.main(ActivityThread.java:7625)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)

Happens on an Android 9 HUAWEI device Seems to be that the notification persists and then when an action is called the app can't find anything. Probably doesn't reflect much to the end user

sleepy-evelyn commented 3 years ago

Caused by the START STICKY call on onStartCommand since it returns a null reference. Get it to retain the state using START_REDELIVER_INTENT