Open arodriguezgb opened 3 years ago
Ok, the possibility is that your app code calling AudioSystem.setAndroidMediaButtons, is being set (to a one-element array, with the sole value of zero), but no actions are being defined. i.e.
AudioSystem.instance.setAndroidNotificationButtons(<dynamic>[],
androidCompactIndices: <int>[0]);
When I do that, I get the same stack trace.
02-06 11:15:51.578 1966 1966 E StatusBar: java.lang.IllegalArgumentException: setShowActionsInCompactView: action 0 out of bounds (max -1)
Is this a possible issue in your app?
@monkeyswarm
Not sure, I actually set them like the tutorial / example suggests. I have certain scenarios but its never empty, its PAUSE / PLAY or PAUSE / PLAY FORWARD BACKWARDS. But i can take a look to see if theres a possibility where theres an empty action somewhere.
Here is a screenshots of some of the scenarios. Maybe "m doing this wrong and its what's causing the issue.
Hey guys, I installed crashalytics and was able to find more about this crash. Its about the notification, more closely the .setShowActionsInCompactView().
This line here:
I found more info about it here https://stackoverflow.com/questions/47920158/java-lang-illegalargumentexception-setshowactionsincompactview-action-1-out-of and here https://github.com/tanguyantoine/react-native-music-control/issues/230
Here is a bit of an explanation of what could be happening.
I am not very knowledgable on Java, so Im not perfectly sure how to help but maybe others can help so we can eliminate this crash from this helpful plugin.
Edit: Changing this .setShowActionsInCompactView(compactNotificationActionIndices) to this .setShowActionsInCompactView(0) crashes the app on startup with the exact crash that Ive seen reported on the developer console.
So im thinking there is something with with the logic of the compactIndices that in certain scenarios it makes the app crash.