Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
10-22-2009 12:25 AM
I have a background application in which I am trying to capture GPS data: latitude & longitude. This is working fine in simulator, but not working fine in real device. For, this I created a GPS class by which I am trying to retreive the data.
When, I used the same class in an UIApplication. It is showing the data on Screen of the respective UiApplication, but, is returning no gps data in the background application.
Am I wrong in fetching the gps data from a background thread? Is it like this that we can do the aforesaid task in a forground application only..? Plz. help me in resolving ths problem. As, I am trying my hands upon this since last so many days..
10-22-2009 12:38 AM
Yeah.. I am testing it outside also, but what do you mean by "have gotten a fix before"?
10-22-2009 12:42 AM
well the question is if u run the location thread in a background thread how do u know when or if it has a fix.....
so to make sure if your application has a fix use another application wait till it has a fix and then start ur application then ur app should have gps in a few seconds this way u know for use if its ur application or if it is just the case you not having a gps signal... as i assume u know how gps works and how long it takes to get a signal.....
i have written loads of applications and always run them in the ui thread as i never had to move them into a background task ..... but i would love to know if there are issues....
10-22-2009 12:44 AM
If a GPS receiver is cold booted, and assistance is not use, the time to first fix is going to take in the order of minutes, not seconds. So, try to wait and get a fix first, and then test your application.
10-22-2009 01:08 AM - edited 10-22-2009 07:18 AM
Thanks Pauland ydaraishy for ur quick response,
Actually I am using a timer in my application, which runs the GPS class (this implements LocationListener) run after a fixed interval and sleeps for sometime, and again runs the listener. The code I am using is :
10-22-2009 01:24 AM
ok sure that makes sense ... so are you sure that you have GPS signal ? as the code looks fine to me .... it just never gets to the point where it has GPS signal ... which i think it means that your device hasnt found GPS yet .. as it takes a while to locate you.... so can you ensure u have gps first before running ur application .... and let me know if thats the case ....
10-22-2009 01:30 AM
Yeah I am able to access google maps from my device and also as I said earlier, UIApplication with the above GPS class is also running fine.
10-22-2009 03:17 AM
I am eagerly waiting for anybody's response on the post. Anybody Simon, Peter, BBDeveloper... Plz plz pay attention to this post also.
10-22-2009 05:16 AM
Anybody, Kindly pay attention to this post. I really need an urgent help for this.