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
New Developer
faheemamjad0482
Posts: 14
Registered: ‎02-20-2013
My Device: BB 10 Dev Alpha B

NonSatellite Based location services timeouts 99% of time

Hi,

 

I am working on a location based application in which i want current location of the device using NonSatellitePositioningMethods. It only reply with location i.e. longitude and latitude 1% of time it requested and 99% of time its timeout signal is fired.
I have enabled location services, Data Services on device and Location permissions in app too.

 

Can any  body help me in this regard?

Faheem

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

Re: NonSatellite Based location services timeouts 99% of time

How long do you give it?

New Developer
faheemamjad0482
Posts: 14
Registered: ‎02-20-2013
My Device: BB 10 Dev Alpha B

Re: NonSatellite Based location services timeouts 99% of time

Thanks for your instant reply.

 

I have following settings for it.

m_positionSource->setProperty( "responseTime", 60.0); // 60 Sec
m_positionSource->setUpdateInterval(60000); // 60 Sec

 

Every time when I launched application it timeouts after the about set time. Ihave tried by setting time to 120 Secs too but failed.

 

Regards

BlackBerry Development Advisor
jehrismann
Posts: 68
Registered: ‎10-15-2012
My Device: Z10

Re: NonSatellite Based location services timeouts 99% of time

Hi Faheem,

 

This is unusual behaviour for sure.

 

  • Do you have good cell reception and/or are you close to wifi access points where you are?
  • To get the position are you calling m_positionSource->startUpdates() or m_positionSource->requestUpdate()?
  • Does it affect the results if you don't set the responseTime property (or if you disable it by setting it to 0)?
  • Can you check if there is an error code reported in your timeout slot (see the section on replyErrorCode here)?
  • How well does it work for GPS (i.e. specify SatellitePositioningMethods). Ideally you need to go outside to test GPS.

Sorry if some of this may seem obvious, just want to characterize your situation.

 

Regards,

Jim

Developer
StevenKader
Posts: 645
Registered: ‎02-03-2010
My Device: Z10 LE

Re: NonSatellite Based location services timeouts 99% of time

[ Edited ]

I recommend downloading the sample app "Location Diagnostics" this will let you do many tests to see what may be going on.  You can find it near the bottom here :  https://developer.blackberry.com/cascades/sampleapps/


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
New Developer
faheemamjad0482
Posts: 14
Registered: ‎02-20-2013
My Device: BB 10 Dev Alpha B

Re: NonSatellite Based location services timeouts 99% of time

[ Edited ]

Thanks a lot Jim for your quick reply.

 

I have followed your guidelines and found that data services were not configured correctly and that 1% I got response is due to wifi connectivity which have very weak signals. I didn't pay attention to wifi as my task is to use Service Provider's information. Now I have configured the Data services and its working fine.


But for testing purpose I went to a location where there is not network coverage and found that location service didn't timeout until 300 sec. I forcefully close the application and retry again it continued to wait more than 5 min.

I have set the response property to 60 sec but it is not firing timeout signal.

How to forcefully timeout if it is unable to find location in 1 or 2 mins???

 

Regards

Faheem

BlackBerry Development Advisor
jehrismann
Posts: 68
Registered: ‎10-15-2012
My Device: Z10

Re: NonSatellite Based location services timeouts 99% of time

Hi Faheem,

 

The responseTime property should be respected, if you can consistently reproduce the problem you should consider reporting a bug.

 

Although not an ideal solution, as a safeguard, you can sync a QTimer to your position request. When the timer fires you can inform the user that it is taking a long time/do they want to keep trying/etc.

 

Regards,

Jim

New Developer
faheemamjad0482
Posts: 14
Registered: ‎02-20-2013
My Device: BB 10 Dev Alpha B

Re: NonSatellite Based location services timeouts 99% of time

[ Edited ]

Jim, Thanks a lot for your solution.

I have tried more or less 10 times and wait for average 5-6 mins for the response but it is not firing timeout signal.

I tested it by turning off wifi and Data services of Service provide on BB dev alpha B.

I have even tried by

m_positionSource->requestUpdate(60000); // 60 sec timeout

but again it didn't fire timeout signal.

 

But again thanks a lot for your help.

Regards

Faheem