Documentation
Related Topics
Page: Location Polling
|
Page: Location polling properties
|
Page: Location polling properties
|
Page: Location Polling
|
Page: View Location Polling
|
Page: Location Macros
|
Page: Enabling Device Location Service
|
Page: Use Case Configurations
|
Page: Use Case Configurations
|
Page: View Location Polling
|
Page: Enabling Device Location Service
|

Labels
All Versions
Location Polling
A AppStudio application can be configured to access native device location services so a user's current location is available to individual screens. For example, an application screen might require a user's current location in order to locate the closest providers of a given service, such as car repair or urgent medical care.
The section describes the following topics:
- Location polling properties
- View Location Polling
- Enabling Device Location Service
- Location Macros
- Use Case Configurations
Configuration
You can configure an application to poll for location data at two levels, application and view:
- Application: The application polls for location data at configured intervals. This service starts as soon as the application is launched and runs continuously when the the application is in the foreground; on BlackBerry devices, polling also continues in the background. Location data is globally available to all screens. You enable application-wide location polling by setting the application property GPS Precision to Coarse or Fine.
- View: A screen can obtain location data if its view is configured to enable location services. The view seeks to obtain location data only when the AppServer is contacted—typically, when view data is downloaded and uploaded. You enable view-specific location polling by setting the view property GPS Enabled to Coarse or Fine.
For more information on the GPS Precision and GPS Enabled properties, see Location polling properties.
You can configure location polling at one or both levels, depending on your requirements. For example, you might wish to minimize device energy consumption by disabling location polling at the application level, and enable specific views to obtain location data only as needed by individual screens. On the other hand, continuous location polling at the application level can ensure that location data is always available to a screen when needed.
Location data precedence
One set of location data is available to the application at a given time. The latest location data, whether obtained by a view or the application, always supersedes the previous location data. A given view uses the current location data regardless of its source, as long as it conforms to its own configured requirements—stale time and precision. If the current location data does not conform to any one of these requirements—for example, location data has a precision setting of Coarse, while the current view requires Fine precision—a fresh location is requested.