Skip to content

Commit b3c8dd6

Browse files
committed
Merge branch 'release/5.3.0'
2 parents fa55dd3 + 533413f commit b3c8dd6

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordova-plugin-broadcaster",
3-
"version": "5.2.0",
3+
"version": "5.3.0",
44
"description": "Allow send message from Javascript to Native",
55
"cordova": {
66
"id": "cordova-plugin-broadcaster",
@@ -26,7 +26,7 @@
2626
"2.3.0": {
2727
"cordova-android": ">4.0.0"
2828
},
29-
"5.2.0": {
29+
"5.3.0": {
3030
"cordova-android": ">9.0.0"
3131
}
3232
}

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<plugin id="cordova-plugin-broadcaster"
3-
version="5.2.0"
3+
version="5.3.0"
44
xmlns="http://apache.org/cordova/ns/plugins/1.0"
55
xmlns:android="http://schemas.android.com/apk/res/android">
66
<engines>

src/android/CDVBroadcaster.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import android.content.Context;
55
import android.content.Intent;
66
import android.content.IntentFilter;
7+
import android.os.Build;
78
import android.os.Bundle;
89
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
910
import android.util.Log;
@@ -157,7 +158,11 @@ public void run() {
157158
protected void registerReceiver(android.content.BroadcastReceiver receiver, android.content.IntentFilter filter, boolean isGlobal) {
158159

159160
if (isGlobal) {
160-
this.webView.getContext().registerReceiver(receiver, filter);
161+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
162+
this.webView.getContext().registerReceiver(receiver, filter, Context.RECEIVER_EXPORTED);
163+
} else {
164+
this.webView.getContext().registerReceiver(receiver, filter);
165+
}
161166
return;
162167
}
163168
LocalBroadcastManager.getInstance(super.webView.getContext()).registerReceiver(receiver, filter);

0 commit comments

Comments
 (0)