muteFavorite

abstract suspend fun muteFavorite(locationId: Long): List<FavoriteLocation>

Mutes a favorite location - a pause, not an opt-out: it stays in the member's list, but produces neither notifications nor automatic visits until it is unmuted. A running visit-detection session drops its geofence. (Blacklisting is LocationFavoriteType.EXCLUDED, not muting.)

Use it when the member wants a break from a place without losing it - for example a gym they will not visit for a while. It has no facilities() counterpart. Resume with unmuteFavorite.

Android (Kotlin)

lifecycleScope.launch {
try {
val favorites = AFCore.locations().muteFavorite(locationId = favorite.locationId)
showFavorites(favorites)
} catch (t: Throwable) {
showError(t)
}
}

iOS (Swift)

Task {
do {
let favorites = try await AFCore.shared.locations().muteFavorite(locationId: favorite.locationId)
showFavorites(favorites)
} catch {
showError(error)
}
}

Return

The complete, post-mutation favorites list.

Parameters

locationId

Canonical location id.

Throws

if the request fails.