Android 14 had some security changes when register an broadcast receiver and when is created an mutable PendingIntent, this is throwing and exception preventing this plugin to work.
System.err: java.lang.SecurityException: net.my.cordova.app: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
Note: android.content.Context#registerReceiver only received a flags param on android SDK 26, so I split the registration of the broadcast receivers, only passing the flag to the affected version.
@EltonFaust , thanks for this change! I cherry picked it in my fork of this repo. I hope @ghenry22 will choose to merge it. Apps that target SDK 34 (now required by the play store) crash without the change.
Android 14 had some security changes when register an broadcast receiver and when is created an mutable PendingIntent, this is throwing and exception preventing this plugin to work.
Note: android.content.Context#registerReceiver only received a flags param on android SDK 26, so I split the registration of the broadcast receivers, only passing the flag to the affected version.