Skip to content

Commit

Permalink
Android 14 support
Browse files Browse the repository at this point in the history
  • Loading branch information
axinvd committed Oct 18, 2023
1 parent 570aae5 commit 29e77ed
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 29e77ed

Please sign in to comment.