// TODO: notify user when the state of the GPS resource is disabled. use one icon on action bar?
public void applyGPSSetting() {
        // verify if GPS enable on device
        if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) {
            GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext());
            Boolean showGPSLocation = gpsSettingController.getGPSLocationState();
            Boolean showGPSLocationOnCenter = gpsSettingController.getGPSCenterState();
            if (showGPSLocation != null)
                if (showGPSLocation) {
                    MainActivity mainActivity = (MainActivity) context;
                    GPSOverlayController gpsOverlayController = mainActivity.getMainController().getGpsOverlayController();
                    gpsOverlayController.addGPSTrackerLayer();
                    gpsOverlayController.setKeepOnCenter( ((showGPSLocationOnCenter != null)?(showGPSLocationOnCenter):(false)) );
                }
        }else {
            // TODO: notify user when the state of the GPS resource is disabled. use one icon on action bar?
        }
    }
}
}else {
// TODO: notify user when the state of the GPS resource is disabled. use one icon on action bar?
}
}
Boolean showGPSLocation = gpsSettingController.getGPSLocationState();
Boolean showGPSLocationOnCenter = gpsSettingController.getGPSCenterState();
if (showGPSLocation != null)
if (showGPSLocation) {
MainActivity mainActivity = (MainActivity) context;
GPSOverlayController gpsOverlayController = mainActivity.getMainController().getGpsOverlayController();
gpsOverlayController.addGPSTrackerLayer();
gpsOverlayController.setKeepOnCenter( ((showGPSLocationOnCenter != null)?(showGPSLocationOnCenter):(false)) );
}
}else {
// TODO: notify user when the state of the GPS resource is disabled. use one icon on action bar?
}
}
public void applyGPSSetting() {
// verify if GPS enable on device
if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) {
GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext());
Boolean showGPSLocation = gpsSettingController.getGPSLocationState();
Boolean showGPSLocationOnCenter = gpsSettingController.getGPSCenterState();
if (showGPSLocation != null)
if (showGPSLocation) {
MainActivity mainActivity = (MainActivity) context;
GPSOverlayController gpsOverlayController = mainActivity.getMainController().getGpsOverlayController();
gpsOverlayController.addGPSTrackerLayer();
gpsOverlayController.setKeepOnCenter( ((showGPSLocationOnCenter != null)?(showGPSLocationOnCenter):(false)) );
}
}else {
// TODO: notify user when the state of the GPS resource is disabled. use one icon on action bar?
}
}