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.

To use a Get Location action:

  1. Add the action in one of three ways, depending on your preference and where you want it added:
    • Drag the action from the Actions palette onto the canvas, dropping the action either at the bottom edge of the action it is to follow, or at the top edge of the action it is to precede.
    • Double-click the action in the Actions palette to add it to an empty canvas or to the end of an action chain.
    • On the canvas, select the action you want the new action to follow, then double-click the new action in the Actions palette.


  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.

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