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
colombus
Posts: 264
Registered: ‎06-04-2009
My Device: Not Specified

How to handle different states in GPS distance calculator

Hi 

 

I am developing an application to find the distance walked by a user. I want to handle different states like gps not available etc I requires some suggestion for below scenarios

I am using locationlistener which will get the location in every 5 seconds. I want to know how to handle the condition like when I am inside the building or area where gps signal is weak. I can wait for sometime and display to user that gps not available. Is this a standard way or shud i try to keep get the location. 

 

I saw an application like GPS speedometer where it was trying t acquire satellites but i couldnt see the message as gps is not available. I would like to get suggestion on how to implement this part that after certain time say 30 sec gps stops and user will be displayed a message. Will the timeout value in Location listener help me to achieve this.

One more query is whether when timeout occurs an exception will be thrown or it get reflected in statechanged method

Please use plain text.
Developer
peter_strange
Posts: 19,595
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to handle different states in GPS distance calculator

Please use plain text.