Skip to content

Commit

Permalink
Merge branch 'master' into fix-null-navigator-randomly-on-android
Browse files Browse the repository at this point in the history
  • Loading branch information
moonjava2005 authored Nov 9, 2023
2 parents eae064a + 58edd09 commit a720283
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit a720283

Please sign in to comment.