LocationProvider¶
Outgoing Messages¶
GetCountry¶
Requests the ISO country code for the current geolocation of the device.
JSON Structure¶
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "LocationProvider",
"action": "GetCountry"
}
}
}
GetLocation¶
Requests the current geolocation of the device.
JSON Structure¶
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "LocationProvider",
"action": "GetLocation"
}
}
}
Incoming Messages¶
LocationServiceAccessChanged¶
Notifies the Engine of a change in location service access.
JSON Structure¶
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "LocationProvider",
"action": "LocationServiceAccessChanged"
}
},
"payload": {
"access": {{LocationServiceAccess}}
}
}
Payload¶
Property | Type | Required | Description | Example |
---|---|---|---|---|
access | LocationServiceAccess | Yes | Describes the access to the geolocation service on the device. |
GetCountryReply¶
Reply for GetCountry message.
JSON Structure¶
{
"header": {
"version": "4.0",
"messageType": "Reply",
"id": {{String}},
"messageDescription": {
"topic": "LocationProvider",
"action": "GetCountry",
"replyToId": {{String}}
}
},
"payload": {
"country": {{String}}
}
}
Payload¶
Property | Type | Required | Description | Example |
---|---|---|---|---|
country | String | Yes | The current country. |
GetLocationReply¶
Reply for GetLocation message.
JSON Structure¶
{
"header": {
"version": "4.0",
"messageType": "Reply",
"id": {{String}},
"messageDescription": {
"topic": "LocationProvider",
"action": "GetLocation",
"replyToId": {{String}}
}
},
"payload": {
"location": {{Location}}
}
}
Payload¶
Property | Type | Required | Description | Example |
---|---|---|---|---|
location | Location | Yes | The current location. |
Type Definitions¶
Location¶
JSON Structure¶
{
"latitude": {{Float}},
"longitude": {{Float}},
"altitude": {{Float}},
"accuracy": {{Float}}
}
Properties¶
Property | Type | Required | Description | Example |
---|---|---|---|---|
latitude | Float | Yes | Location latitude. Use -1 if the location is not available. | |
longitude | Float | Yes | Location longitude. Use -1 if the location is not available. | |
altitude | Float | No (default: -1 ) |
A location altitude in meters. | |
accuracy | Float | No (default: -1 ) |
A location accuracy in meters. |
Enums¶
LocationServiceAccess¶
Values¶
Value | Description |
---|---|
"DISABLED" | The location service on the device is disabled (e.g., GPS is turned off). |
"ENABLED" | The location service on the device is enabled (e.g., GPS is turned on). |