Motorola Inc.

i88s J2ME Developers’ Guide

ALMANAC Out Of Date

After permission is granted, the Java API will bring up a system screen to prompt the user if the Almanac data in the phone is out of date or invalid, and the phone is not provisioned for packet data service. This is done only once after the phone powers up. If the user gives permission to override Almanac data, the Java API will try to retrieve position data. If user does not grant the Almanac override, the Java API will return the position with its attributes

set to UNAVAILABLE and the status of PositionConnection set to

POSITION_RESPONSE_NO_ALMANAC_OVERRIDE.

1.3PositionConnection Class

This interface supports the creation of a connection to the GPS receiver (driver). GPS position can be retrieved and status can be obtained after creating a connection. Only one connection is allowed at a time. This API must be called from a separate thread from the main application thread.

To get a PositionConnection, the MIDlet must use the generic Connector class.

Example

com.motorola.iden.PositionConnection sc = (com.motorola.iden.PositionConnection)Connector.open(String name);

String name should be one of the following:

name = “mposition:delay=no”

name = ”mposition:delay=low”

name = ”mposition:delay=high”

delay=no

This option has been designed to provide the cell latitude and longitude to an application immediately after it requests them. Because all other attributes in the AggregatePosition class may be set to UNAVAILABLE, an application should use this connection only to access the cell latitude and longitude. This request does not make use of the GPS chipset. If the handset is outside of the network coverage area, the cell latitude and longitude will be set to 0.

delay=low

This option provides a response to the application in a few seconds. New assist data is retrieved only if no assist data exists or if the assist data is older than the Maximum Assist Data Age (MADA). This operation is transparent to the application. This option is designed to provide all the position attributes with assistance from the Location Enhanced Service (LES) Server. To exercise this option, the device needs to have packet data service. Currently the maximum response time for this type of request is 32 seconds. If the API times out, the position will be returned with appropriate status and error code. If a low-delay request is made outside of the network coverage area, then the API will not get the assist data from the LES. The fix will proceed without assist data, and the timeout will remain at the low-delay value of 32 seconds.

Version 1.0 - Page 7

Page 7
Image 7
Motorola i88s manual PositionConnection Class, Almanac Out Of Date, Example