Migration guide
The removed APIs arrived in mobilisten version 9.0.0, when the SDK's ZohoSalesIQ class moved to
Kotlin. The behavior changes arrived in version 9.0.3. If you are upgrading from an earlier version,
go through each change on this page.
This guide lists every breaking change in the Zoho SalesIQ Android SDK (Mobilisten), with the code before and after the upgrade. It covers the APIs that were removed or changed, and the behavior changes that can affect your app. You can find the new APIs in the API reference.
The Java API of the ZohoSalesIQ class keeps the same methods as before, so your Java code does not
need changes. The only exceptions are the removals listed in this guide. In Kotlin, some parameters
and return values may now accept or return null differently. This can stop your code from
compiling until you adjust it, but it does not break your app while it runs.
General upgrade steps
- Update
mobilistento its latest version in yourapp/build.gradle.ktsfile. If you usemobilisten-calls, update it to its own latest version too. The two modules have separate version numbers, so check the Releases section for the latest version of each one. - Sync and build your project. Let Gradle choose the versions of the libraries that the SDK relies on, and do not force them.
- Make the changes described in the sections below. Then test the main flows again: starting the SDK, showing chat, sending a message, and receiving a push notification.
Removed APIs
| Removed API | Replacement |
|---|---|
ZohoSalesIQ.Chat.open(chatId) | ZohoSalesIQ.present(PresentOptions(PresentOptions.Screen.Conversation(chatId, PresentOptions.Screen.Conversation.SessionType.CHAT))) |
The ZohoSalesIQ.Tab enum and setTabOrder(Tab…) | Both are removed. To open a specific screen, use present(PresentOptions) with the Conversation or KnowledgeBase screen. |
present(Tab), present(Tab, String), present(Tab, String, callback) | present(PresentOptions[, callback]) |
The top-level getListener() for SalesIQListener | Set the listener with setListener(...). The SDK reads it internally, so the getter is no longer available. |
Chat.getListener() for SalesIQChatListener | Set the listener with Chat.setListener(...). |
ChatActions.getListener() for SalesIQActionListener | Set the listener with ChatActions.setListener(...). |
Notification.getListener() for NotificationListener | Set the listener with Notification.setListener(...). |
KnowledgeBase.getListener() for SalesIQKnowledgeBaseListener | Set the listener with KnowledgeBase.setListener(...). |
Notification.disablePush(token, isTestDevice) | Notification.disablePush(). It takes no parameters and uses the token that you registered with enablePush(). |
To replace Chat.open(), change the call as follows:
// Before
ZohoSalesIQ.Chat.open(chatId)
// After
ZohoSalesIQ.present(PresentOptions(PresentOptions.Screen.Conversation(chatId, PresentOptions.Screen.Conversation.SessionType.CHAT)))
The five getListener() removals matter only if your app reads back a listener that it set earlier.
Setting a listener with setListener(...) works the same as before.
// Before, you could read the listener back.
val listener = ZohoSalesIQ.Chat.getListener()
// After, keep your own reference. Setting the listener works as before.
val listener = MyChatListener()
ZohoSalesIQ.Chat.setListener(listener)
Behavior changes
These changes keep the same APIs but change what your app sees.
The launcher follows your portal setting (9.0.3)
From version 9.0.3, the launcher follows the launcher setting of your Android app in the SalesIQ
portal. When that setting is off, the SDK hides the launcher. To keep showing it, call
ZohoSalesIQ.Launcher.show() with the ALWAYS or WHEN_ACTIVE_CHAT visibility mode:
// Show the launcher even when the portal setting is off.
ZohoSalesIQ.Launcher.show(ZohoSalesIQ.Launcher.VisibilityMode.ALWAYS)
handleChatReOpened also reports operator reopens (9.0.3)
From version 9.0.3, SalesIQChatListener.handleChatReOpened is called when an operator reopens a
chat, as well as when the visitor reopens it. If your app treats this callback as an action that the
visitor took, check the chat's state instead.
After upgrading
- Make sure that your ProGuard and R8 rules still match the dependency list.
- Compare your theme with the Theme section, in case anything looks different.
- Send yourself a test push notification and tap it, as the Test your setup section describes.
- Read the release notes in the Releases section for every version between your old one and the new one.