¡@

Home 

2014/10/16 ¤W¤È 08:26:32

android Programming Glossary: time_duration

Switching between gps and network provider according to the availability

http://stackoverflow.com/questions/8655928/switching-between-gps-and-network-provider-according-to-the-availability

catch Exception ex if gps_enabled locationManager.requestLocationUpdates LocationManager.GPS_PROVIDER TIME_DURATION 100 locationListener else if network_enabled Checking for GSM locationManager.requestLocationUpdates LocationManager.NETWORK_PROVIDER.. else if network_enabled Checking for GSM locationManager.requestLocationUpdates LocationManager.NETWORK_PROVIDER TIME_DURATION DISTANCE locationListener public class GeoUpdateHandler implements LocationListener private void getPresentLocation Location.. .equals LocationManager.GPS_PROVIDER locationManager.requestLocationUpdates LocationManager.NETWORK_PROVIDER TIME_DURATION 1 locationListener else locationManager.requestLocationUpdates LocationManager.GPS_PROVIDER TIME_DURATION 1 locationListener..