Code example for LocationManager

Methods: getProvider

0
        manager = (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE);
        assertNotNull(manager);
    } 
 
    public void testGetBogusProvider() { 
        LocationProvider p = manager.getProvider("bogus");
        assertNull(p);
    } 
 
    public void testGetNetworkProvider() { 
        LocationProvider p = manager.getProvider("network");
        assertNotNull(p);
    } 
 
    public void testGetGpsProvider() { 
        LocationProvider p = manager.getProvider("gps");
        assertNotNull(p);
    } 
 
    public void testGetBestProviderEmptyCriteria() { 
        String p = manager.getBestProvider(new Criteria(), true);