Mobile SDK Best Practices
This page helps developers avoid common issues when implementing the Mobile SDK.
Initialize Chat Properly
Your developers must connect your app to CXone Mpower to begin communication back and forth. This creates a WebSocket connection. Developers can do so by calling ConnectionProvider.connect(). Be sure to instruct your developers to do so only for active chat conversations. This ensures that the WebSocket only runs when necessary.
Authorize App Users
This may not pertain to every application.
Some apps have a role or user type for end users. This may give them permission to use or access certain parts of the app. If your app controls end user permissions, you may need to enable access to use chat.
Prepare to Use Analytic APIs
TO use CXone Mpower analytics APIs, you must have the chat in the .prepared state. You can do so using the ConnectionProvider.prepare(environment:brandId:channelId:) method. Otherwise, the SDK responds with an illegalChatState error.