BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 04-08-2009, 05:28 AM   #1 (permalink)
New Member
 
Join Date: Apr 2009
Model: 9000
PIN: N/A
Carrier: indosat
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Fail create criteria to use AGPS method using JSR179

Please Login to Remove!

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
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.