Code example for LocationListener

Methods: onStatusChanged

	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);
Connect your IDE to all the code out there  Get Codota for Java