Fix “permission denied for this window type” when adding React Native to an Android app

Fix

  • canDrawOverlays( this )) { // Open the permission page Intent intent = new Intent ( Settings .
  • Fix “permission denied for this window type” when adding React Native to an Android app
  • If you have followed the react-native Integration With Existing Apps tutorial with a target SDK version > 23, you may get the “permission denied for this window type” error when you open the react-native view.
  • To get rid of this error, you must request the new permissions from the user.
  • In the previous Activity, you may have something like this to go to your react Activity.

If you have the “permission denied for this window type” error when you open the react-native view, the problem is the new android permission system.

@ReactiveConf: Fix “permission denied for this window type” when adding #ReactJS Native to an #Android app:

If you have followed the react-native Integration With Existing Apps tutorial with a target SDK version > 23, you may get the “permission denied for this window type” error when you open the react-native view. The problem is the new android permission system.

To get rid of this error, you must request the new permissions from the user.

In the previous Activity, you may have something like this to go to your react Activity.

Instead of going directly on your new Page, you must request for permission first:

To have a complete example of a react-native integration in an Android existing application, you can see this commit.

If your application still crashes on the react-native Activity on release, you may have forgotten to Bundle your javascript.

Last but not least, you may also have some problems with 32-bit architecture, like this:

Fix “permission denied for this window type” when adding React Native to an Android app