Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 54
Registered: ‎10-05-2012
My Device: blackberry curve 9300
My Carrier: Vodafone

Getting Location from both cellsite and agps...

Hi ,, I want to get the location from both gps and cellsite ... how can i run both  together???

  I have created two different threads and is there any way to run both services ??

New Contributor
Posts: 7
Registered: ‎11-07-2011
My Device: Bold 9900
My Carrier: Bell

Re: Getting Location from both cellsite and agps...

Hi gopi_riar.   You can get both results.  Can you provide a little more information on what you are looking to do?  May be beneficial for you to attempt to get an autonomous fix first then failover to cell or geolocation.

Developer
Posts: 54
Registered: ‎10-05-2012
My Device: blackberry curve 9300
My Carrier: Vodafone

Re: Getting Location from both cellsite and agps...

[ Edited ]

hi,

i m building a background application so  i was getting location from the autonomous mode and storing it in database and now i want when i didn't get the location from autonomous mode i.e when i got lacation exception i want to get the location from cellsite mode ..

 

or can i just start both together i.e both get location at same time then i will check that is gps autonomous mode giving location parameters then i decide on that basis that which location parameters are to be used

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Getting Location from both cellsite and GPS...

The correct approach does depend on your application requirement.

 

In one application I have one Thread that tries to get a Location, if Cell Site fails it just them tries to get a GPS location.  Another runs two Threads, one CellSite and one GPS.  You decide what you want. 

 

You probably won't get them at the same time if you start both together, GPS takes a lot longer. 

 

Later (OS 6.0 and above I think) allow you to specify a "fail over" method, so you specify one approach and a backup approach, so you might find this useful. 

 

Think all is explained in here:

http://supportforums.blackberry.com/t5/Java-Development/Location-APIs-Start-to-finish/ta-p/571949