-
Notifications
You must be signed in to change notification settings - Fork 24
Android destroy could craches the app #10
Comments
Hi @JumBay, that was done here https://github.com/ingageco/capacitor-music-controls-plugin/pull/8/files, it is merged already! |
@eamador is right - when i saw this last week, i thought the same thing. let me know if we are wrong, or if a something doesn't reflect the change (like npm). |
When I was testing the plugin, calling |
I did test again and it still crashes on android, works on ios : E/Capacitor: Serious error executing plugin
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.getcapacitor.PluginHandle.invoke(PluginHandle.java:99)
at com.getcapacitor.Bridge$1.run(Bridge.java:521)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.ingageco.capacitormusiccontrols.MusicControlsNotification.destroy()' on a null object reference
at com.ingageco.capacitormusiccontrols.CapacitorMusicControls.destroy(CapacitorMusicControls.java:191)
at java.lang.reflect.Method.invoke(Native Method) |
@JumBay I'm currently running into this issue myself. Are you still experiencing this or was there a fix/workaround? |
UPDATE: Fixed using fix at line 188. Also had to set a value of "" for:
even though these are optional? |
@mlnisd I didn't try so far but I guess the issue is still there. I use my fork https://github.com/wako-app/capacitor-music-controls-plugin btw |
Hi,
In https://github.com/ingageco/capacitor-music-controls-plugin/blob/master/android/src/main/java/com/ingageco/capacitormusiccontrols/CapacitorMusicControls.java#L188, could you replace:
By
To avoid have the app crashes if
notification
is not defined.Thanks for the great work.
The text was updated successfully, but these errors were encountered: