protected override void OnHandleIntent(Intent intent) { if (intent == null) { return; } MvxTrace.TaggedTrace(TAG, "GeofenceTransitionsIntentService handle intent"); var geofencingEvent = GeofencingEvent.FromIntent(intent); if (geofencingEvent.HasError) { var errorMessage = GeofenceErrorMessages.GetErrorString(this, geofencingEvent.ErrorCode); MvxTrace.TaggedError(TAG, errorMessage); return; } int geofenceTransition = geofencingEvent.GeofenceTransition; if (geofenceTransition != Geofence.NeverExpire) { IList <IGeofence> triggeringGeofences = geofencingEvent.TriggeringGeofences; var geofencesIds = GetGeofenceTransitionDetails(this, geofenceTransition, triggeringGeofences); LoadOffersInGeofences(geofencesIds); } else { // Log the error. MvxTrace.TaggedError(TAG, GetString(Resource.String.geofence_transition_invalid_type, new[] { new Java.Lang.Integer(geofenceTransition) })); } }
private void HandleResult(Statuses status, string message) { if (status.IsSuccess) { MvxTrace.TaggedTrace(TAG, message); } else { var errorMessage = GeofenceErrorMessages.GetErrorString(Application.Context, status.StatusCode); MvxTrace.TaggedError(TAG, errorMessage); } }