BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 04-08-2009, 04: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

Vintage Williams wrenches Nice Snap-On Industrial (SK, MAC, Matco, Blue Point)
$27.0
Vintage Williams wrenches Nice  Snap-On Industrial (SK, MAC, Matco, Blue Point) pictureVINTAGE APPLE MOUSEPAD II IIC IIE MAC MACINTOSH 1984 1985 RETRO
$9.99
VINTAGE APPLE MOUSEPAD II IIC IIE MAC MACINTOSH 1984 1985 RETRO pictureVintage Mac Tools Offset Slotted Screwdriver OD2 USA
$20.0
Vintage Mac Tools Offset Slotted Screwdriver OD2 USA pictureVintage 1/2" Drive MAC VUI 166T 6 Point Impact Swivel Socket
$11.95
Vintage 1/2Mac Tools PNEUMATIC OILER AL 12 Vintage
$13.0
Mac Tools PNEUMATIC OILER AL 12 Vintage picture






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