Skip to content

Instantly share code, notes, and snippets.

@tugcearar
Created September 10, 2020 15:02
Show Gist options
  • Save tugcearar/5d611c48b6004679d8b55d5a533a9e26 to your computer and use it in GitHub Desktop.
Save tugcearar/5d611c48b6004679d8b55d5a533a9e26 to your computer and use it in GitHub Desktop.
public class CreateGeoFailListener : Java.Lang.Object, IOnFailureListener
{
private Activity mainActivity;
public CreateGeoFailListener(Activity mainActivity)
{
this.mainActivity = mainActivity;
}
public void OnFailure(Java.Lang.Exception ex)
{
Toast.MakeText(mainActivity, "Geofence request failed: " + GeofenceErrorCodes.GetErrorMessage((ex as ApiException).StatusCode), ToastLength.Long).Show();
}
}
public class CreateGeoSuccessListener : Java.Lang.Object, IOnSuccessListener
{
private Activity mainActivity;
public CreateGeoSuccessListener(Activity mainActivity)
{
this.mainActivity = mainActivity;
}
public void OnSuccess(Java.Lang.Object data)
{
Toast.MakeText(mainActivity, "Geofence request successful", ToastLength.Long).Show();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment