location - android - how to limit a proccess by time -
i'm trying search user's location, problem want limit time search time. is, if enough location not found after ten seconds or so, return best location found until time.
i have asynctask activates location listener. i'm trying limit time android.os.process.getelapsedcputime()
works when location location listener has arrived after time set.
what want keep running time passed, regaredless of location listener. how can so?
why cant u run timer (java.util.timer) can create timertask. start both asynctask , timer @ time scheduling interval of 10 seconds. after 10 seconds check status of asynctask. if still in running or pending state cancel asynctask. think helpful you.
Comments
Post a Comment