Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export broadcast receiver #38

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading