|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface supports creation of a connection to a position source that allows applications to obtain position information. An object of this type is obtained through generic connector as Connector.open("mposition:parameters"). Only one connection is allowed at a time. The API must be called from separate thread. Only one request of getPosition() can be made and pending at a time. If an application makes multiple requests without getting response from the previous request null position will be returned. Application should handle all the status code before checking position's response code and using it. The MIDlet must use the generic Connector class to create PositionConnection. 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"
Field Summary | |
static int |
POSITION_NO_RESPONSE
This constant indicates that the device is not responding. |
static int |
POSITION_RESPONSE_ERROR
This constant indicates that an error occurred while retrieving the position. |
static int |
POSITION_RESPONSE_NO_ALMANAC_OVERRIDE
This constant indicates that the Almanac is outdated, and the user is restricted to override. |
static int |
POSITION_RESPONSE_OK
This constant indicates that the obtained position is a valid position. |
static int |
POSITION_RESPONSE_RESTRICTED
This constant indicates that the user has set the device to not provide the position information. |
static int |
POSITION_WAITING_RESPONSE
This constant indicates that the API is waiting for a response from the position device. |
Method Summary | |
java.lang.String |
getNMEASentence(int type)
A method for API to get nmea sentences |
AggregatePosition |
getPosition()
A method for applications to obtain the position with same delay value of Connector.open(String parameter). |
AggregatePosition |
getPosition(java.lang.String name)
A method for applications to obtain a new position with appropriate delay type. |
int |
getStatus()
A method returning the status of the underlying position device. |
boolean |
requestPending()
A method returning the request pending flag of the device. |
void |
stopNMEASentence()
A method for API to stop nmea messages |
Field Detail |
public static final int POSITION_RESPONSE_OK
public static final int POSITION_WAITING_RESPONSE
public static final int POSITION_NO_RESPONSE
public static final int POSITION_RESPONSE_ERROR
public static final int POSITION_RESPONSE_RESTRICTED
public static final int POSITION_RESPONSE_NO_ALMANAC_OVERRIDE
Method Detail |
public int getStatus()
public AggregatePosition getPosition()
public AggregatePosition getPosition(java.lang.String name)
name
- a position connection property.public boolean requestPending()
public java.lang.String getNMEASentence(int type) throws java.lang.IllegalArgumentException
type
- of messagepublic void stopNMEASentence()
none
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |