g123k / flutter_plugin_device_apps

Flutter plugin to get the list of installed applications (iOS is not supported yet).
https://pub.dev/packages/device_apps
Apache License 2.0
107 stars 93 forks source link

App doesn't open when it's in background - Need to request SYSTEM_ALERT_WINDOW permission #105

Open tanzil114 opened 10 months ago

tanzil114 commented 10 months ago

Please see: https://developer.android.com/guide/components/activities/background-starts

If we want the app to open any other app while it is background, our app needs to have SYSTEM_ALERT_WINDOW permission. The plugin DeviceApps doesn't check for this, and returns true on calling openApp method, even though the app doesn't get opened. Once we have the permission, it opens up alright.

https://developer.android.com/reference/android/Manifest.permission#SYSTEM_ALERT_WINDOW