On 04/07/2010 01:36 AM, Farha Ansari wrote:
but i am getting location in method onLocationChanged() and this is
where i want to check that if i dont get update say within 1 minute,
thn is hould end handler. So, how can i do it here?
Thanks

There are lots of ways to generate "timeouts". If your timeout
action is something that just needs to change the display in
some way, you can use postDelayed with a Runnable with
your timeout action. Actually, it doesn't have to be just UI
affecting, but it can't block for a long period of time. If you need
to block, just fire up a thread to handle it using Thread.wait().

Mike

On Apr 7, 9:32 am, "Maps.Huge.Info (Maps API Guru)"<[email protected]>
wrote:
One method you could use is to setup a progress handler to monitor the
location fix. If after x seconds you have nothing then you can end the
handler, shutdown the listeners and inform your users. Pretty straight
forward, I'm sure there are better ways to do this as well. Basically,
you have to construct your own location timeout.

-John Coryat

On Apr 6, 10:34 pm, Farha Ansari<[email protected]>  wrote:



Hi,
In blackberry, we use a timeout to get the location, so that if it
doesnt retun location in that much time period, we get to know. But in
Android, there is no concept of timeout, can anyone please tell the
alternative, that we can find out that after this much time there is
no location update from GPS.
Thanks- Hide quoted text -
- Show quoted text -

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to