Operation fails when trying to start scan in ForegroundTask due to dependency on Activity.
Proposed solution:
- Remove activity from PermissionsHandler constructor
- Make PermissionsHandler activity aware -> to set activity instance when available (check for null is already present in requestPermissions method)
- Replace requestPermissions with hasPermissions inside _ensureInitialized and throw error if not granted -> let the user request permission when activity available and start scan even if App in background if permissions already granted
Note:
I already have a fix for this but I am not able to push into the repo (patch attached)
universal_ble_background_scan.patch
Operation fails when trying to start scan in ForegroundTask due to dependency on Activity.
Proposed solution:
Note:
I already have a fix for this but I am not able to push into the repo (patch attached)
universal_ble_background_scan.patch