ExternalSharedPermsFLTest.javaAPI DocAndroid 5.1 API1835Thu Mar 12 22:22:12 GMT


public class ExternalSharedPermsFLTest extends android.test.InstrumentationTestCase

Fields Summary
Constructors Summary
Methods Summary
public voidtestRunFineLocation()
The use of location manager below is simply to simulate an app that tries to use it, so we can verify whether permissions are granted and accessible.

        LocationManager locationManager = (LocationManager)getInstrumentation().getContext(
        locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
                new LocationListener() {
                        public void onLocationChanged(Location location) {}
                        public void onProviderDisabled(String provider) {}
                        public void onProviderEnabled(String provider) {}
                        public void onStatusChanged(String provider, int status, Bundle extras) {}