Android how to get gps location
Posted
by Faisal khan
on Stack Overflow
See other posts from Stack Overflow
or by Faisal khan
Published on 2010-04-28T06:06:33Z
Indexed on
2010/04/28
6:13 UTC
Read the original article
Hit count: 460
I want to detect location from gps listener and also from network
my code is as follows
For network location listen
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,
WLConstants.DELAY_HOUR, 500.0f,
nsl); // where nsl is listener implements LocationListener
and for the gps location listen
locationManager.requestLocationUpdates(
LocationManager.GPS_PROVIDER, WLConstants.DELAY_HOUR, gpsListener
.getMinDistance(), gpsListener);// where gps listener implements LocationListener
Can we have one listener to listen both rather then launching two different listeners to listen from network and gps???
© Stack Overflow or respective owner