Skip to content

Commit

Permalink
Export broadcast receiver (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
pappz authored Dec 4, 2024
1 parent 2648195 commit 7a02f88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<permission
android:name="io.netbird.permission.NOTIFICATION"
android:protectionLevel="signature" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="com.google.android.gms.permission.AD_ID" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />


<application
android:name=".MainApplication"
android:allowBackup="false"
Expand All @@ -18,10 +21,8 @@
<receiver
android:name=".NotificationReceiver"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="action.ROUTE_CHANGED" />
</intent-filter>
android:exported="true"
android:permission="io.netbird.permission.NOTIFICATION">
</receiver>

<activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public ReactNativeHost getReactNativeHost() {
private void registerNotificationReceiver() {
IntentFilter filter = new IntentFilter();
filter.addAction(NetworkChangeNotifier.action);
registerReceiver(notificationReceiver, filter, RECEIVER_NOT_EXPORTED);
registerReceiver(notificationReceiver, filter, RECEIVER_EXPORTED);
}

@Override
Expand Down

0 comments on commit 7a02f88

Please sign in to comment.