Skip to content

Commit 29e77ed

Browse files
committed
Android 14 support
1 parent 570aae5 commit 29e77ed

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/android/app/src/main/java/com/reactnativenavigation/react/JsDevReloadHandler.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import android.content.IntentFilter;
88
import android.view.KeyEvent;
99
import android.widget.EditText;
10+
import android.os.Build;
1011

1112
import com.facebook.react.devsupport.interfaces.DevSupportManager;
1213
import com.reactnativenavigation.utils.UiUtils;
@@ -49,7 +50,11 @@ public void removeReloadListener(ReloadListener listener) {
4950
}
5051

5152
public void onActivityResumed(Activity activity) {
52-
activity.registerReceiver(reloadReceiver, new IntentFilter(RELOAD_BROADCAST));
53+
if (Build.VERSION.SDK_INT >= 34 && activity.getApplicationInfo().targetSdkVersion >= 34) {
54+
activity.registerReceiver(reloadReceiver, new IntentFilter(RELOAD_BROADCAST), Context.RECEIVER_EXPORTED);
55+
} else {
56+
activity.registerReceiver(reloadReceiver, new IntentFilter(RELOAD_BROADCAST));
57+
}
5358
}
5459

5560
public void onActivityPaused(Activity activity) {

0 commit comments

Comments
 (0)