Geolocation external object

Official Content
This documentation is valid for:

This API enables you to provide several Location Services on their Smart Devices Applications by interacting with the GPS on the device where the app is running.

The scenarios that this API resolves are described in the following document. To enable the use of this API many methods, such as GetMyLocation, GetLatitude, GetAddress, etc have been defined and also a new Structure Data Type has been defined, the GeoLocationInfo.

Clipboardexternalobject-Location_png GeolocationExternalObject

Properties

AuthorizationStatus

Returns the current authorization status. This can be useful when you are using an API that requires a higher authorization level that the one the user gave. We can warn the user and ask him to go to the settings and add the necessary permission if he currently has a minor permission (WhenInUse or Denied). This property is based on APIAuthorizationStatus domain.

Methods

Note: Those methods marked with an asterisk (*) only work on the device (not simulator nor web environment).

GetMyLocation method *

Returns the current location of the device.

Return value  GeolocationInfo
Parameters      minAccuracy:Numeric(8.0), timeout:Numeric(8.0), IncludeHeadingAndSpeed:Boolean [, ignoreErrors:Boolean ]
 

Authorized method *

Indicates whether the application has been given permission to use location services.

Return value  Boolean
Parameters None
 

ServiceEnabled method *

Indicates whether location services are enabled in the device.

Return value  Boolean
Parameters None
 

StartTracking method *

Starts generating tracking information. Check Tracking article.

Return value  None
Parameters changeInterval:Numeric(8.0), distance:Numeric(8.0), action:Character(20), actionTimeInterval:Numeric(8.0) [, accuracy:Numeric(8.0) ]

EndTracking method *

Stops the generation of tracking information. Check Tracking article.

Return value  None
Parameters None
 

GetLocationHistory method

Returns a collection of location information generated by the tracking methods. Check Tracking article.

Return value  GeolocationInfo
Parameters startTime:DateTime
 

ClearLocationHistory method

Removes all previous location information generated by the tracking methods. Check Tracking article.

Return value  None
Parameters None
 

GetLatitude method *

Returns the latitude of the given location.

Return value  Numeric(9.5)
Parameters location:Geolocation
 

GetLongitude method *

Returns the longitude of the given location.

Return value  Numeric(9.5)
Parameters location:Geolocation
 

GetDistance method

Returns the distance between the two locations given.

Return value  GeolocationInfo
Parameters fromLocation:Geolocation, toLocation:Geolocation
 

GetAddress method.

Returns a collection of addresses for the given location.

Return value  Collection( Address )
Parameters location:Geolocation domain
 

GetLocation method

Returns a collection of locations for the given address.

Return value  Collection( Geolocation )
Parameters address:Address
 

SetProximityAlerts method *

Sets a set of proximity alerts and returns the success status of the operation. Check HowTo: Using Geolocation Proximity Alerts article.

Return value  Boolean
Parameters proximityAlerts: Collection(GeolocationProximityAlerts)
 

GetProximityAlerts method *

Get the list of proximity alerts set. Check HowTo: Using Geolocation Proximity Alerts article.

Return value  proximityAlerts: Collection( GeolocationProximityAlerts )
Parameters None
 

GetCurrentProximityAlert method *

Get the information of the current proximity alert. Check HowTo: Using Geolocation Proximity Alerts article.

Return value  GeolocationProximityAlerts
Parameters None
 

ClearProximityAlerts method *

Clear the list of proximity alerts set. Check HowTo: Using Geolocation Proximity Alerts article.

Return value  None
Parameters None
 

PickLocation Method

Picks (or select) a location. 

Return value  None
Parameters GeolocationPickerParameters:GeolocationPickerParameters
 

Events

It does not have any.

Domains

APIAuthorizationStatus domain

Detailed description in APIAuthorizationStatus domain.

Structured Data Types

GeolocationInfo

Detailed description in GeolocationInfo Data Type article.

GeolocationProximityAlert

Detailed description in GeolocationProximityAlert Data Type article.

GeolocationPickerParamters

Detailed in GeolocationPickerParameters Data Type article.

Notes

Scope

Platforms  Smart Devices (iOS, Android)

Videos

Start Video Work With for Smart Devices – Behavior through Events

Availability

Geolocation external object is available as of GeneXus X Evolution 3.


 


Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.