-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hello there! Trying to gain background access. I learned that Peko, while requesting ACCESS_BACKGROUND_LOCATION, transitions user to the app permission settings only if ACCESS_FINE_LOCATION was previously gained, otherwise the flow does not emit anything. Is it intended behavior?
Steps to reproduce:
AndroidManifest:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
Activity's onCreate():
PermissionRequester.apply {
initialize(applicationContext)
lifecycleScope.launch {
repeatOnLifecycle(STARTED) {
try {
instance().request(
permission.ACCESS_BACKGROUND_LOCATION,
)
.catch {
Log.d("DEBUG_PERMISSIONS", "catch: $it")
}
.collect {
Log.d("DEBUG_PERMISSIONS", "$it")
}
} catch (e: Throwable) {
Log.d("DEBUG_PERMISSIONS", "error: $e")
}
}
}
}
Metadata
Metadata
Assignees
Labels
No labels