Code example for LocationManager

Methods: addGpsStatusListener

0
        assertNull(locationManager.getBestProvider(new Criteria(), true));
    } 
 
    private Listener addGpsListenerToLocationManager() {
        Listener listener = new TestGpsListener();
        locationManager.addGpsStatusListener(listener);
        return listener;
    } 
 
    private static class TestLocationListener implements LocationListener {
        @Override 
        public void onLocationChanged(Location location) {
        } 
 
        @Override 
        public void onStatusChanged(String s, int i, Bundle bundle) {
        } 
 
        @Override 
        public void onProviderEnabled(String s) {
        }