diff --git a/lib/android/app/src/main/java/com/reactnativenavigation/react/JsDevReloadHandler.java b/lib/android/app/src/main/java/com/reactnativenavigation/react/JsDevReloadHandler.java index 412b42faf4..c562ccd551 100644 --- a/lib/android/app/src/main/java/com/reactnativenavigation/react/JsDevReloadHandler.java +++ b/lib/android/app/src/main/java/com/reactnativenavigation/react/JsDevReloadHandler.java @@ -7,6 +7,7 @@ import android.content.IntentFilter; import android.view.KeyEvent; import android.widget.EditText; +import android.os.Build; import com.facebook.react.devsupport.interfaces.DevSupportManager; import com.reactnativenavigation.utils.UiUtils; @@ -49,7 +50,11 @@ public void removeReloadListener(ReloadListener listener) { } public void onActivityResumed(Activity activity) { - activity.registerReceiver(reloadReceiver, new IntentFilter(RELOAD_BROADCAST)); + if (Build.VERSION.SDK_INT >= 34 && activity.getApplicationInfo().targetSdkVersion >= 34) { + activity.registerReceiver(reloadReceiver, new IntentFilter(RELOAD_BROADCAST), Context.RECEIVER_EXPORTED); + } else { + activity.registerReceiver(reloadReceiver, new IntentFilter(RELOAD_BROADCAST)); + } } public void onActivityPaused(Activity activity) {