Code example for LocationListener

Methods: onStatusChanged

0
 
	@Override 
	public void onStatusChanged(final String arg0, final int arg1,
			final Bundle arg2) {
		if (mListener != null) {
			mListener.onStatusChanged(arg0, arg1, arg2);
		} 
	} 
 
	public boolean startListening(final LocationListener pListener,
			final long pUpdateTime, final float pUpdateDistance) {
		boolean result = false;
		mListener = pListener;
		for (final String provider : mLocationManager.getProviders(true)) {
			if (LocationManager.GPS_PROVIDER.equals(provider)
					|| LocationManager.NETWORK_PROVIDER.equals(provider)) {
				result = true;
				mLocationManager.requestLocationUpdates(provider, pUpdateTime,
						pUpdateDistance, this);
			} 
Stop searching for code, let great code find you!  Add Codota to your java IDE