In Android 8.0 (maybe above) a notification with action may cause a null reference exception.
In may case, it happen when notification shows and the app is already close, so a message likes "XXX is stop working" will show.
This is annoyance to user and cause high rate of crash report in Android Vitals.
I try to fix the problem by replace the "UnityPlayer.currentActivity" to "context" (from parameter of onReceive method)
In Android 8.0 (maybe above) a notification with action may cause a null reference exception. In may case, it happen when notification shows and the app is already close, so a message likes "XXX is stop working" will show. This is annoyance to user and cause high rate of crash report in Android Vitals.
I try to fix the problem by replace the "UnityPlayer.currentActivity" to "context" (from parameter of onReceive method)