FAXL3: ActionStartGPS

From fringDocumentation

Jump to: navigation, search

Contents

ActionStartGPS

On devices with GPS support, starts sampling the GPS at each interval (given as a argument). At each interval it sends to the Add-on server the current location.

Element ActionStartGPS

The following are the elements or building blocks comprising an ActionStartGPS:

RequiredDirectionNameTypeDescription
RequiredINargInervalnumeric/refContains the sampling interval in milliseconds.

FAXL Syntax

<ActionStartGPS>
	<IN>
		<argInerval>
			<value>30</value>
		</argInerval>
	</IN>
</ActionStartGPS>

ClientNotification responses

Once ActionStartGPS is sent to the client, GPS information will be returned back to the add-on. The response will be a ClientNotification response in the following format:

<ClientNotification>
<User>[SOME_USER_HASH]</User>
<GeoNotification>
<Status>[STATUS]</Status>
</GeoNotification>
</ClientNotification>

The Status tag (inside the GeoNotification tag) can be one of the following:

  1. service_unsupported - Mobile device does not have GPS support
  2. service_is_not_allowed_by_user - GPS information blocked in fring client (user needs to change settings in order to resolve this)
  3. temporary_unavailable - GPS information is currently unavailable on mobile device for some reason (no satellite reception or other reason)
  4. ok - Means that the client received the start GPS action and will start sending GPS information (A ClientNotification with this status will be followed by another one with feed status. More about it, below)
  5. feed - This status is actually the GPS information itself. If this status is received the GeoNotification tag will include two more tags with information in them: Latitude and Longitude.

Here is a example of GeoNotification with feed status:

<ClientNotification><User><![CDATA[===someUserHash===]]></User><GeoNotification><Status>feed</Status><Latitude>32.09587249</Latitude><Longitude>34.82202973</Longitude></GeoNotification></ClientNotification>
Personal tools