I have to ask what it is returning after 12 seconds? It could have
found the location already. Sometimes my app can get the new location
in around 5 seconds. Then sometimes it will sit there for up to 2 and
half minutes (my limit on the thread). I've seen Google Maps take up to
2 minutes (their apparent limit). I set up the GPS and run a thread
which checks every second to see if a location has been found. It also
presents a progress dialog which can cancel the process if the user
doesn't want to wait. Before I actually run the service I also check
for network and last known locations and store those. On cancel one of
those unless unavailable will be presented. GPS depends on the
availability of satellites to sync with and if you can receive them.
On 08/31/2011 12:53 AM, souissi haythem wrote:
Hi,
I got a problem: when i lunch my GPS from a service, My GPS start
working for 12 seconds then stop. How can i do to make my GPS work for
3 minutes?
the is my code:
lManager =
(LocationManager)getSystemService(Context.LOCATION_SERVICE);
lManager.requestLocationUpdates(choix_source,10000, 1, this);
Thanks :)
--
You received this message because you are subscribed to the Google Groups "Android
Discuss" 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-discuss?hl=en.