Considerations and Limitations
- GeofencingService requires the use of the mobile device location detection hardware. The user must grant your app access to the device’s location. The exact user experience is governed by the platform. The request happens automatically on first use, and is managed by the device itself, but you should plan for it when designing the user experience of your app.
-
In Android 11 or later, if the user taps “Deny” for permission to access the mobile device location more than once during the app’s lifetime of installation on a device, the user won’t see the system permissions dialog again. Tapping Deny multiple times implicitly chooses the “don’t ask again” option.
In previous versions of Android, users would see the system permissions dialog each time the app requested permission unless the user had previously selected “don’t ask again”. This change in Android 11 discourages repeated requests for permissions that users have chosen to deny.
If the user has denied permission to access the mobile device location and needs to change their permissions to allow access, they can do so in their device’s settings.
- Location tracking is subject to significant privacy, processing, and power use restrictions, imposed by the underlying platform (Android or iOS). See important details in the GeofencingService API reference documentation.
- Many factors affect the accuracy of location detection, the speed of determining the current location, and how much impact location tracking has on battery life.
- Mobile devices vary in the quality of the location detection they provide.
- If a mobile device can’t determine its location, neither can GeofencingService. The quality of the device’s positioning hardware, tall or dense buildings, indoor use, and other external factors can reduce the accuracy of location determination.
- Location tracking on high accuracy can significantly increase power use, which affects how quickly a mobile device drains its battery.
Development Considerations
GeofencingService requires access to positioning hardware, such as GPS, Wi-Fi, cellular, and other location-detection hardware of your mobile device. To test location services during development, use actual, physical devices when possible.
- The Android emulator and iOS simulator can each be configured to provide simulated location details.
- Neither virtual device accurately simulates location detection in the real world, especially for environments where location detection is challenging.
You can certainly develop the user experience for your component on a desktop or laptop development system. But be sure to test geofencing-based functionality on the physical devices on which you plan to deploy your Lightning app.
GeofencingService Considerations
Be aware of the following considerations when using GeofencingService in your Lightning app.
- GeofencingService is built on top of mobile operating system and device features. GeofencingService’s capabilities therefore depend on Android or iOS features, which are subject to change beyond our control. When mobile operating system features change, the behavior of GeofencingService can change without notice.
- There’s a maximum number of 20 monitored geofences at any time.