https://facebook.github.io/react-native/docs/integration-with-existing-apps.html
talks about overlay permission.
They add the permission check code to the activity which hosts react native view.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (!Settings.canDrawOverlays(this)) {
Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
Uri.parse("package:" + getPackageName()));
startActivityForResult(intent, OVERLAY_PERMISSION_REQ_CODE);
}
}
It seems the permission is required because react native needs to show the debug window in an overlay.
How to turn it off in production build?