04-17-2013 05:15 AM
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?
04-17-2013 05:30 AM
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.
04-17-2013 04:51 PM
This is unusual behaviour for sure.
Sorry if some of this may seem obvious, just want to characterize your situation.
04-17-2013 04:56 PM - edited 04-17-2013 04:56 PM
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/sampleap
04-18-2013 08:38 AM - edited 04-18-2013 08:39 AM
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???
04-18-2013 10:05 AM
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.
04-18-2013 11:48 AM - edited 04-18-2013 11:50 AM
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.