updateStatus method

bool updateStatus(
  1. GeofenceStatus status,
  2. Activity activity,
  3. Position position
)

Update geofence status of GeofenceRadius. If the status changes, it return true, otherwise it return false.

Implementation

bool updateStatus(
    GeofenceStatus status, Activity activity, Position position) {
  if (status != _status) {
    _status = status;
    _activity = activity;
    _speed = position.speed;
    _timestamp = position.timestamp;
    return true;
  }

  return false;
}