zello-android-client-sdk
zello-android-client-sdk copied to clipboard
`muteContact` has no effect + questions
I am writing a piece of application which does the following:
- Signs in as a gateway
- Mutes all contacts except for a specific group/channel
- Listens for incoming messages for the specific group
Here is a simple example I am running to test the logic:
override fun onAppStateChanged() {
val appState = AppState()
Zello.getInstance().getAppState(appState)
when {
appState.isSignedIn -> {
muteContacts()
}
}
}
private fun muteContacts() {
val zello = Zello.getInstance()
val contacts = zello.contacts ?: return
(0 until contacts.count)
.mapNotNull {
contacts.getItem(it)
}
.forEach {
val mute = it.type != ContactType.GROUP && it.name != "Everyone"
Log.d("ZELLO", "Mute ${it.name}: $mute")
zello.muteContact(it, mute)
}
}
A few questions:
- even after calling
muteContact(contact, true)
, I can hear messages coming directly from the user. Why isn't it muted? - will calling
muteContact
for a user also mute messages from this user in a group/channel, or only direct messages?
Please let me know if I am not using the API correctly, or if there is another way to achieve what I want.
We aren't able to reproduce the issue reported above. Would you verify that contact muting is enabled in the admin console of your network?