I read "How_To_-_Define_criteria_to_retrieve_a_GPS_fix" document (I cannot post link), and I code criteria like this
Code:
criteria.setCostAllowed(true);
criteria.setHorizontalAccuracy(500); // I try Criteria.NO_REQUIREMENT too
criteria.setVerticalAccuracy(500); // I try Criteria.NO_REQUIREMENT too
criteria.setPreferredPowerConsumption(Criteria.NO_REQUIREMENT); // I try Criteria.POWER_USAGE_MEDIUM too
and I use default value too (Criteria criteria = null;)
I use following code to know is GPS use agps or not:
Code:
public void locationUpdated (LocationProvider provider, Location location) {
int method = location.getLocationMethod();
if((method & Location.MTA_ASSISTED) != 0)
{
// code to print "ASSISTED"
}
else
{
// code to print "NON ASSISTED"
}
}
I test using blackberry 9000, with Option->Advanced Options->GPS with: GPS Data Source (Device GPS), GPS Services (Location ON), and Location Aiding (Enabled)
I always get "NON ASSISTED" in my app.
My question is, how to get ASSISTED as gps method ? or there is reason why it get "NON ASSISTED" instead "ASSISTED" ?
btw, I test my code using Nokia E90 and it print "ASSISTED".
Thanks for attn