In order to enable or disable the notifications of a chat, which is the best API to use:
GroupChannel.setMyPushTriggerOption
or GroupChannel.setPushPreference
?
Is there any difference between these two in order to enable or disable notifications?
@antonio.vitiello you should use setPushPreference
. Its more like enable/disable and setMyPushTriggerOption
is for triggering push for certain event such as mention.
Thank you @Woo !
But if I’m not mistaken setPushPreference
doesn’t immediately update the object GroupChannel while setMyPushTriggerOption
does, or am I wrong?
I’m sorry! Please use setMyPushTriggerOption
instead setPushPreference
. setPushPreference
is deprecated
@Woo my environment doesn’t tell me that this method is deprecated, maybe I have an old version of the library?
Where can I download the new version?
Oh its not deprecated yet but it will soon. You can just use setMyPushTriggerOption
for push configuration. Can you elaborate a bit more about " setPushPreference
doesn’t immediately update the object GroupChannel"? which property is not get updated?
With >> setPushPreference
doesn’t immediately update <<
I mean that the GroupChannel object is not immediately updated after calling groupChannel.setPushPreference(false)
on it, while groupChannel.setMyPushTriggerOption(GroupChannel.PushTriggerOption.OFF)
does, in this case the GroupChannel actually turns off notifications.
Thanks a lot @Woo , solved.
I see, I will inform our android team to see regards setPushPreference
issue! Thanks
Hi, @antonio.vitiello
Android is same.
setPushPreference
was deprecated. We missed deprecate annotation. Please use setMyPushTriggerOption