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: 19,633
Registered: ‎07-14-2008
My Device: Not Specified

Finding My Location - how does BB Maps do it?

I have a user who has a Blackberry 9800.  On his phone, BB maps can find his location.  But my program and the Diagnostic Extended code found here:

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

can not.  And there is no location shown in the

Options-->Device-->Location

 

He is in a building, no chance of getting GPS.

 

He has rebooted the phone a number of times.  After each, it takes BB maps a while to find his location (which it finds correctly, though not very accurately).

 

When running the Diagnostic Extended, I have only tested 3 'modes':

1) Standalone times out after some time,

2) Cell Site times out almost immediately and

3) Default times out.

As this is not a CDMA phone, none of the other options are applicable (I believe anyway). 

 

So the question is, how does Maps do it?

 

I have just asked the user to turn WiFi off and restart.  I will let you know how this goes.

 

For the record, details of the phone are:

 

9800 Bundle 695 - 6.0.0.246

Branding is 1.0.453.331U

BB Maps is 6.0.0.14.

 

This is frustrating, if BB Maps can find a location why can't my code?  Any hints gratefully accepted.

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

Re: Finding My Location - how does BB Maps do it?

Just done some testing, and can confirm that BB Maps is indeed getting its location fomr WiFi. 

 

I guess what i need to know is what changes I can make to suggest that the Locatin Services use WiFi too!

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

Re: Finding My Location - how does BB Maps do it?

[ Edited ]

Just had this happen again, on another device, which is used by one of my client's big-wigs!  Pressure is on to resolve this. Same device and OS as above. 

 

The original device which had the problem is still failing despite numerous restarts.

 

As noted I have tried the Diagnostic tests 'extended' functions as supplied.  It is reporting an Exception as soon as I try Cell Site - a time out.  The timeout is clearly wrong since the processing has been going for less than a second.  I think the focus for this question has changed and there are now two issues:

 

a) Why does the Cell Site location timeout after less than 1 second?

 

b) How can I change the location request so that it will use WiFi as well as Cell Site?

BlackBerry Development Advisor
Posts: 249
Registered: ‎07-14-2008
My Device: Not Specified

Re: Finding My Location - how does BB Maps do it?

[ Edited ]

Hi Peter,

Cellsite timesout fast because the carrier doesnt support it. You need to use One of the geolocation modes (WiFi or WLAN). My LocationDiagnosticEx sample shows how. 

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

 

However, note that you must be compiling this with 6.0 to be able to use Geolocation Modes.

 

Note that Cellsite mode is a carrier mode while the geolocation modes are RIM provided services.

 

Shadid

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

Re: Finding My Location - how does BB Maps do it?

Thanks Shadid, I will test this later. 

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

Re: Finding My Location - how does BB Maps do it?

[ Edited ]

I have done some more testing and I agree, the WLAN option is how BBM Maps finds the location on the failing device.  Unfortunately this does not really help this application I am working on since it is typically used while the BlackBerry is out and about.  But at least we understand what we need to do. 

 

However my testing does not support this comment:

 

"Cellsite timesout fast because the carrier doesnt support it."

 

I have found a 9800 running an identical OS level that is on the same carrier (Orange UK) and this phone is happily providing Cell Site fixes.

 

I have a number of other phones on the same carrier that do work fine too.   

 

In addition, the application that we are testing has a significant number of downloads, and while we have had a few issues with location, these have not typically been restricted to Orange UK.  I have tested phones on all the other major networks and they work fine.

 

So I am confident that Orange UK can provide a Cell Site location, which suggests the fast timeout is not caused because the carrier does not support it. 

 

Edit: More testing.  A device that failed immediately with a timeout, works in another location?   Is there something about any location that causes the timeout?

 

Is there another possible cause for the immediate timeout? 

BlackBerry Development Advisor
Posts: 249
Registered: ‎07-14-2008
My Device: Not Specified

Re: Finding My Location - how does BB Maps do it?

Hi Peter,

There are two kinds of cellsite fixes.

 

First, there is the RIM Geolocation service which makes a network call to our servers to get you a location. This method kicks in if you specify the Cell based Geolocation mode in your provider (See LocationInfo). In this case, a timeout or even a success can take time. It can also return immediately with an error if the service is disabled in device options. If you have specified the Cellsite mode (See GPSInfo), which maps to the carrier provided cellsite fix, can also map to RIM Geolocation IFF the carrier does not support or provide cellsite mode.

 

Second, there is the carrier provided Cellsite mode (same as the last scenario above), which if supported, will return immediately with a fix because the fix is sent to the device when the current cellsite changes. So it doesnt really have to make a on-demand call every time you ask for a fix.

 

Does this explain what you are seeing?

 

Shadid

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

Re: Finding My Location - how does BB Maps do it?

Thanks Shadid,  useful information

 

However it does explain my question. 

 

When I originally reported the immediate Cellsite timeout, you replied:

"Cellsite timesout fast because the carrier doesnt support it."

 

However the same phone, on the same network, running the same OS, will get Cellsite timeouts in some location and values in other.  The explanation "because the carrier doesnt support it" does not explain what we see.

 

Is there another possible cause for the immediate timeout? 

Highlighted
Trusted Contributor
Posts: 176
Registered: ‎04-12-2012
My Device: Bold 9780 & Curve 8250
My Carrier: vodacom

Re: Finding My Location - how does BB Maps do it?

Hi Peter
If you can Please take a look at my post.. maybe you can help Smiley Happy

http://supportforums.blackberry.com/t5/Java-Development/quot-get-My-Location-quot/m-p/1913073

Thank you