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

Native Development

Reply
Developer
fredoust
Posts: 75
Registered: ‎09-12-2012
My Device: Looking for a BB10 testing device
My Carrier: Developper

Beta 4 - GPS

Hi all,

my app use GPS feature and works very well in beta 3.

Now in beta 4 I can't get my position updated.

 

The sample application location diagnotics doesn't work anymore in beta 4.

 

Did I miss something ?

 

Thanks for all.

---------
Mobile developer freelance - QtQuick - Cascades - WP7 - Android
My works : http://fdelgado.fr
Please use plain text.
Developer
bobdodd
Posts: 116
Registered: ‎10-31-2012
My Device: BB10 Dev Alpha B
My Carrier: -

Re: Beta 4 - GPS

[ Edited ]

I tested my GPS app yesterday on Beta 4 and the update to the Dev Alpha. It seems to be working as well as it was... As well as it was, meaning that it still struggles to find more than 3 satellites.

 

I just tried the Geolocation app on the updated Alpha and it still works for me. That's not with a rebuild tho, I'll try a rebuild and post the result.

 

What result are you getting? No satellites, or no response from the BPS?

 

Update: Sorry, I can't rebuild the Geolocation example: cascades won't open the project today :smileysad:

Lightningcrossfae, stampcollector, and cascadescookbookcpp do open but most of the examples don't...

I updated to Beta 4 without removing Beta 3, so perhaps that's the problem?

 

 

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Beta 4 - GPS

See also http://supportforums.blackberry.com/t5/Cascades-Development/Required-changes-for-geolocation-in-Beta...

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
fredoust
Posts: 75
Registered: ‎09-12-2012
My Device: Looking for a BB10 testing device
My Carrier: Developper

Re: Beta 4 - GPS

Arf, I found the problem.... In settings => location services was disabled, I can't remember if I modified this in the simulator beta 3.

 

Thanks for your intrest bobdodd.

Is there a way to check if the location services is active or not in the settings ?

 

Thanks.

 

---------
Mobile developer freelance - QtQuick - Cascades - WP7 - Android
My works : http://fdelgado.fr
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Beta 4 - GPS

To check whether you have a permission, you generally need to try doing the thing that the permission controls, and catch the error that will occur when you don't have it. Or it may not be an error, but simply a "null" type of return ... no results or whatever.

Given that you have to check for all such errors anyway, since the user may deny the permission, this isn't generally a big deal.

I'm not aware of an API yet to directly check whether a permission has been granted by the user. They might have added something in beta 4 but I'm sure few of us have reviewed all the changes yet.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
kylefowler
Posts: 526
Registered: ‎05-17-2009
My Device: 9900
My Carrier: ATT

Re: Beta 4 - GPS

In the case of location services, the user can give you permission to use location but if the device locationservices are off then nothing will happen no matter what. And right now there is no api to check the state of the global location services.
Like all of my posts
Please use plain text.
Regular Contributor
ametller
Posts: 54
Registered: ‎07-15-2010
My Device: Not Specified

Re: Beta 4 - GPS

This is quite strange. Even activating settings => location services on my device I still don't get GPS coordinates (I'm using BPS events). This also happened to me in Beta 1 & 2. In Beta 3 though it ran flawlessly (usually I got the GPS coordinates in less than 3 seconds). I've tried on 2 different devices with the same results.

 

As a fix type I'm using the GEOLOCATION_FIX_TYPE_BEST, which means that if WiFi is available, it uses it to resolve the GPS coordinates (which is usually faster), otherwise it uses another methods like GSM or GPS Hardware. It seems that the WiFi to GPS resolving doesn't work neither on Beta 4.

 

Any advise would be really welcome.

 

Thanks,

Please use plain text.
Regular Contributor
_NishantShah
Posts: 76
Registered: ‎07-31-2012
My Device: Blackberry
My Carrier: Vodafone

Re: Beta 4 - GPS

[ Edited ]

I am facing same issue now. It was working fine till I upgraded my Dev Alpha device to beta 4 from beta 3. And location services is on. I checked in settings still I can't fetch location. Even the latest location diagnostic sample is not working.

 

Regards,

Nishant Shah

Please use plain text.