Baseflow / flutter-permission-plugins

This repo contains a collection of permission related Flutter plugins which can be used to request permissions to access device resources in a cross-platform way.
https://baseflow.com
MIT License
52 stars 34 forks source link

Android permission allowWhenAppInUse triggering inactive and resumed appLifeStateEvent #49

Open razmik-gharibyan opened 4 years ago

razmik-gharibyan commented 4 years ago

🐛 Bug Report

My application retrieving user location data every 3 seconds. On Android when i choose permission as allowAlways everything works ok. But if i choose allowWhenAppInUse permission, it asks same requestPermission dialog everytime app fetches location (ie every 3 seconds), and if i further press allowWhenAppInUseAndDoNotAskAgain , then app lifecycle state starts to constantly change from inactive to resumed everytime location is fetched. Inactive state can be reached when app have another activity ontop of it, so i assume that requestPermission dialog is somehow showing and poping quickly every 3 second , and it triggers app lifecycle event to change to inactive then to resume and again same cycle.

Version: 3.0.0 +1

Platform: