React-native-permissions: display pop-up window in foreground and in background

Created on 18 Feb 2020  路  9Comments  路  Source: zoontek/react-native-permissions

Question

is it possible to request xiaomi permissions to display pop-up window in foreground and in background?

Most helpful comment

I see that the background pop up window permission is granted by default for apps like Amazon Music and Airbnb. How come that's possible for them?

All 9 comments

@bmp123 Only in foreground, using Android Permissions API.

@zoontek I don't found anything about this permissions in android documentation, maybe you can give link?
image

Sorry I didn't understand correctly your question at first. A bit more context (and the screenshot) helped.

We support Android permissions from the manifest: https://developer.android.com/reference/android/Manifest.permission. If it's not specific to MIUI (Xiaomi OS), it should be in it.

But if it's specific to MIUI how can I get this permissions programmatically? Maybe you know

Or these permissions get's only from settings?

I search for it on internet without any success. I only found https://stackoverflow.com/questions/59645936/displaying-popup-windows-while-running-in-the-background, but there is not code to request the permission directly 馃槥

thank you so much for your answers

you can directly open other permission screen for MIUI (Xiaomi OS) devices using following code:

Intent intent = new Intent("miui.intent.action.APP_PERM_EDITOR"); intent.setClassName("com.miui.securitycenter", "com.miui.permcenter.permissions.PermissionsEditorActivity"); intent.putExtra("extra_pkgname", getPackageName()); startActivity(intent);

but, now problem is how we can check is permission is granted or not ?
If anyone know, please tell me how can check permission.

I see that the background pop up window permission is granted by default for apps like Amazon Music and Airbnb. How come that's possible for them?

Was this page helpful?
0 / 5 - 0 ratings