Motorola Inc. | i88s J2ME Developers’ Guide |
// assistant data unavailable
}
}// end of position response ok else if(c.getStatus() ==
com.motorola.iden.position.PositionConnection.POSITION_RESPONSE_ERROR)
{
//indicate an error occurred while getting the position if(oap.getResponseCode() == PositionDevice.FIX_NOT_ATTAINABLE) {
//means position information not provided (timeout)
}
else if(oap.getResponseCode() == PositionDevice.FIX_NOT_ATTAIN_ASSIST_DATA_UNAV) {
//means position information not provided (timeout) and
//assistant data unavailable
}
else if(oap.getResponseCode() == PositionDevice.BATTERY_TOO_LOW) { // means battery is too low to provide fix
}
else if(oap.getResponseCode() == PositionDevice.GPS_CHIPSET_MALFUNCTION) { // means GPS chipset malfunction
}
else if(oap.getResponseCode() == PositionDevice.ALMANAC_OUT_OF_DATE) {
//means almanac out of date to get fix
//This scenario occurs when user overrides almanac but device is
//not packet data provisioned
}
else{
// Unknown error occurs
}
}// end of position response error
//position is null
}finally {
if ( c != null) c.close();
}
New positions can be obtained using the following method on the same PositionConnection object until the close method is called.
AggregatePosition cell = c.getPosition(“delay=no”);
or
AggregatePosition oap = c.getPosition(“delay=low”);
or
AggregatePosition oap = c.getPosition(“delay=high”);
In addition, to obtain better accurate speed and direction
AggregatePosition oap = c.getPosition(“delay=low;fix=extended”);
or
AggregatePosition oap = c.getPosition(“delay=high;fix=extended”);
Version 1.0 - Page 12