LocationManager clearTestProviderLocation - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for LocationManager clearTestProviderLocation method.

This code example shows how to use the following methods:clearTestProviderEnabled, clearTestProviderLocation, clearTestProviderStatus, removeTestProvider, requestLocationUpdates
7
CodeRank
This code example shows how to use the following methods:clearTestProviderEnabled, clearTestProviderLocation, setTestProviderEnabled
 
		switch (newMode) {
		case REAL_MODE:
			Log.i(TAG, "switch to Real mode");
			mockLocationReceiver.keepMocking = false;
			locationManager.setTestProviderEnabled(
					MockLocationReceiver.MOCK_PROVIDER, false);
			locationManager
					.clearTestProviderEnabled(MockLocationReceiver.MOCK_PROVIDER);
			locationManager
					.clearTestProviderLocation(MockLocationReceiver.MOCK_PROVIDER);
			locationListener.connect();
			break; 
		case MOCK_MODE:
			Log.i(TAG, "switch to MOCK mode");
			locationListener.disconnect();
			locationManager.setTestProviderEnabled(
					MockLocationReceiver.MOCK_PROVIDER, true);
			mockLocationReceiver.resume();
			handler.post(mockLocationReceiver);
5
CodeRank
clearTestProviderLocation Method Overview
Removes any mock location associated with the given provider.
See Code Examples for other Android LocationManager Methods: