Add a Get Location Action

You add a Get Location action to get a user’s live location.

This action requires the user's consent. As a best practice, it should only be fired on a user gesture, so the users can associate the system permission prompt for access with the action they just initiated.

For API information about this action, see Get Location in the Oracle Visual Builder Page Model Reference.

To use a Get Location action:

  1. Add the action in one of three ways, as explained at the end of Built-In Actions.

  2. Update the ID property in the Properties pane to make the action more identifiable.
  3. Set the Maximum Age (in milliseconds) of a possible cached position that is acceptable to return. If set to 0 (default), the device cannot use a cached position and must attempt to retrieve the real current position. If set to Infinity, the device must return a cached position regardless of its age.
  4. Set the Timeout value, representing the maximum length of time (in milliseconds) that the device is allowed to take in order to return a position.
  5. Set the Enable High Accuracy value that indicates whether the application would like to receive the best possible results. If true and if the device is able to provide a more accurate position, it will do so. This can result in slower response times or increased power consumption. If false (default), the device can save resources by responding more quickly or using less power. For mobile devices, you should set this to true in order to use GPS sensors.

If a value is returned by the action, it is assigned to the auto-generated variable shown by the Store Result In property.