Skip to content

Commit 810f330

Browse files
authored
Update Android background location permissions section
Clarified the process for requesting background location permissions on Android 11 and higher, including details about Codename One's handling of the flow and customization options.
1 parent e7d1885 commit 810f330

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/developer-guide/Miscellaneous-Features.asciidoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,7 @@ LocationManager.getLocationManager()
452452

453453
===== Android Background Location Permissions (API 30+)
454454

455-
On Android 11 (API level 30) and higher, requesting background location permission requires a two-step process. First, foreground location permissions must be granted. Then, the app must request background location access, which will direct the user to the system settings to select "Allow all the time".
456-
457-
Codename One handles this flow automatically when you use `LocationManager`. You can enable the background permission request by setting the build hint `android.requiresBackgroundLocationPermissionForAPI29=true`.
455+
On Android 11 (API level 30) and higher, requesting background location permission requires a two-step process. First, foreground location permissions must be granted. Then, the app must request background location access, which will direct the user to the system settings to select "Allow all the time". Codename One handles this flow automatically when you use `LocationManager`.
458456

459457
For Android 11+ (API 30+), Codename One detects if background location is needed and presents a dialog explaining the requirement before redirecting the user to the app settings. You can customize the permission prompt message using the localization key `android.permission.ACCESS_BACKGROUND_LOCATION`.
460458

0 commit comments

Comments
 (0)