Code example for LocationManager

Methods: getProvider

0
        return "set_gps_coordinates"; 
    } 
 
    private boolean doesDeviceProvideGPS() { 
    LocationManager locationManager = (LocationManager) InstrumentationBackend.solo.getCurrentActivity().getSystemService(Context.LOCATION_SERVICE);
    if (locationManager.getProvider(LocationManager.GPS_PROVIDER) == null) {
        return false; 
    } else { 
        return true; 
    } 
     
    } 
     
    /** 
     * Adds new LocationTestProvider matching actual provider on device. 
     *  
     * @param currentProvider 
     * @param providerType 
     */ 
    private void addTestProvider(LocationProvider currentProvider, String providerType) {
    LocationManager locationManager = (LocationManager) InstrumentationBackend.solo.getCurrentActivity().getSystemService(Context.LOCATION_SERVICE);