flutter-permission-handler icon indicating copy to clipboard operation
flutter-permission-handler copied to clipboard

Muiu special permissions?

Open busslina opened this issue 2 years ago • 5 comments

Is there already an issue requesting this feature?

Please select affected platform(s)

  • [X] Android
  • [ ] iOS
  • [ ] Windows

Use case

In my Xiaomi device there is couple of permissions that I don't know if can be handled programmatically. imagen

Translated are:

  • Show on the lock screen
  • Show popup windows while executing in background.

Motivation: I thought that acquiring "System Alert Window" permission was enough to start my foreground service from the backgroud (using Alarm Manager). But in this new phone it seems that this other two permissions are mandatory in order to do that. I don't know if these permissions are Android wide or Xiaomi (Muiu) exclusive. Also I'm wondering if I can get these permissions using this library.

Thank you

Proposal

See above

Specific requirements or considerations

No response

Additional information or context

No response

busslina avatar Jun 24 '23 15:06 busslina

Hi @busslina, thank you for filing this feature request!

The plugin does not currently support this. I looked around and found out that this is certainly possible to add in the future.

  • Show on Lock screen: https://stackoverflow.com/questions/60478065/how-to-enable-show-in-lock-screen-permission-in-andriod
  • Display pop-up windows while running in the background: https://stackoverflow.com/questions/59645936/displaying-popup-windows-while-running-in-the-background

Here is a translated screenshot:

Image

JeroenWeener avatar Jul 13 '23 07:07 JeroenWeener

Hi Thank you for an excellent plugin :) I could really use this feature. any update on the progress?

beebobox avatar Sep 16 '23 05:09 beebobox

Hi @busslina, thank you for filing this feature request!

The plugin does not currently support this. I looked around and found out that this is certainly possible to add in the future.

  • Show on Lock screen: https://stackoverflow.com/questions/60478065/how-to-enable-show-in-lock-screen-permission-in-andriod
  • Display pop-up windows while running in the background: https://stackoverflow.com/questions/59645936/displaying-popup-windows-while-running-in-the-background

Here is a translated screenshot:

Image

Thank you

busslina avatar Sep 16 '23 06:09 busslina

@beebobox the feature is on the lower end of our priority list right now. You can thumb up the original post. We use this to check the demand for features, which influences our prioritization.

We also encourage the community to pick up issues and create a PR. If you have knowledge of Java, we would be happy to assist in your first contribution to the repository!

JeroenWeener avatar Sep 18 '23 07:09 JeroenWeener

Wanted to let you know that we are working on a major refactor of the permission handler plugin. In the new version, we can support Android-only features more easily. What's more, users will be able to write Android-like code in Dart, allowing them to implement features that are not (yet) directly supported by our plugin.

This ticket would suit that scenario very well, as this might not be something we want to support directly, as it is quite specific to MIUI. We would expose all the Android-native classes and functions you need to Dart so you can build the functionality yourself, without having to dig into Java code, method-channels and whatnot.

JeroenWeener avatar Nov 16 '23 11:11 JeroenWeener