The guidelines on this page help you evaluate your app as you make updates to support the latest location features and behavior.
Test how your app handles approximate location
To evaluate whether you need to update your app to support user-configurable location accuracy, complete the tests described in this section.
Handle approximate location request from dialog
To check how your app handles a user's request for your app to have approximate location access from the dialog, do the following:
- Request both
ACCESS_FINE_LOCATION
andACCESS_COARSE_LOCATION
. - In the dialog that appears, where the user can request approximate location, select Approximate near the top, and either While using the app or Only this time near the bottom.
- Check whether your app's use cases still work as expected, even when your app only has approximate location access.
Handle approximate location downgrade from system settings
To check how your app handles a user's request to change your app's location access from precise to approximate in system settings, do the following:
- Request both
ACCESS_FINE_LOCATION
andACCESS_COARSE_LOCATION
. - In the dialog that appears, where the user can request approximate location, select Precise near the top, and either While using the app or Only this time near the bottom.
- Navigate to your app's permissions screen in system settings.
On the location permission screen, turn off Use precise location. This option appears in figure 1.
As with any permission downgrade, the system restarts your app's process.
Check whether your app's use cases still work as expected, even when your app only has approximate location access.
Handle precise location upgrade from system settings
To check how your app handles a user's request to change your app's location access from approximate to precise in system settings, do the following:
- Request both
ACCESS_FINE_LOCATION
andACCESS_COARSE_LOCATION
. - In the dialog that appears, where the user can request approximate location, select Approximate near the top, and either While using the app or Only this time near the bottom.
- Navigate to your app's permissions screen in system settings.
On the location permission screen, turn on Use precise location, as shown in figure 1.
Because this permission change is an upgrade, the system doesn't restart your app.
Check whether your app receives more accurate location data in its location-based use cases.