Android Open Source - Geoclock Toast Location Client Handler






From Project

Back to project page Geoclock.

License

The source code is released under:

GNU General Public License

If you think the Android project Geoclock listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package maurizi.geoclock;
/*ww  w. j  ava  2 s.c om*/
import android.content.Context;
import android.os.Bundle;
import android.widget.Toast;

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesClient;


public class ToastLocationClientHandler
    implements GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener {
  private final Context context;

  public ToastLocationClientHandler(Context context) {
    this.context = context;
  }

  @Override
  public void onConnected(Bundle bundle) {
  }

  @Override
  public void onDisconnected() {
    Toast.makeText(context, R.string.lost_location, Toast.LENGTH_SHORT).show();
  }

  @Override
  public void onConnectionFailed(ConnectionResult connectionResult) {
    Toast.makeText(context, R.string.fail_location, Toast.LENGTH_SHORT).show();
  }
}




Java Source Code List

maurizi.geoclock.AbstractGeoAlarmReceiver.java
maurizi.geoclock.AlarmManagerReceiver.java
maurizi.geoclock.BootReceiver.java
maurizi.geoclock.GeoAlarmFragment.java
maurizi.geoclock.GeoAlarm.java
maurizi.geoclock.GeofenceReceiver.java
maurizi.geoclock.LockableScrollView.java
maurizi.geoclock.MapActivity.java
maurizi.geoclock.NavigationDrawerFragment.java
maurizi.geoclock.ToastLocationClientHandler.java