Geofence/Geofence/Geofence.Plugin.Android/GeofenceImplementation.cs
/// <summary>
/// On Google play services Connection handling
/// </summary>
/// <param name="connectionHint"></param>
On Google play services Connection handling
On Google play services Connection handling
public void OnConnected(Bundle connectionHint)
        {
            Location location=LocationServices.FusedLocationApi.GetLastLocation(mGoogleApiClient);
            SetLastKnownLocation(location);
            if (CurrentRequestType == RequestType.Add)
            {
                AddGeofences();
                StartLocationUpdates();
            }else if(CurrentRequestType == RequestType.Clear)
            {
                RemoveGeofences();
            }
            else if (CurrentRequestType == RequestType.Delete)
            {
               if(mRequestedRegionIdentifiers != null)
               {
                   RemoveGeofences(mRequestedRegionIdentifiers);
               }
            }
            CurrentRequestType = RequestType.Default;
        }
public void OnConnected ( Bundle connectionHint ) { Location location = LocationServices . FusedLocationApi . GetLastLocation ( mGoogleApiClient ) ; SetLastKnownLocation ( location ) ; if ( CurrentRequestType == RequestType . Add ) { AddGeofences ( ) ; StartLocationUpdates ( ) ; } else if ( CurrentRequestType == RequestType . Clear ) { RemoveGeofences ( ) ; } else if ( CurrentRequestType == RequestType . Delete ) { if ( mRequestedRegionIdentifiers != null ) { RemoveGeofences ( mRequestedRegionIdentifiers ) ; } } CurrentRequestType = RequestType . Default ; }
On Google play services Connection handling
On Google play services Connection handling
connectionHint
Bundle
None