Getting Started
1. Install Flutter SDK
or
2. Initialize
3. Login / Logout Process
You need to login (either using
loginAnonymous
orloginWithToken
) once TalkPlus SDK has been initialized.Once user is logged in, FCM token that was registered stays valid until the user logs out. This lets the user receive push notifications even when offline.
When user logs out, make sure to call
logout
function. If this step is omitted and a different user logs into the same device, the latter user will continue to receive push messages intended for the previous user.
4. Realtime Message
TalkPlus subscribes/unsubscribes to realtime channels in sync with app lifecycle.
TalkPlus SDK uses WebSocket to receive messages when your app is in foreground. When you app goes to background, SDK uses FCM to receive messages.
If you intend to receive messages when app goes into background, please refer to Push Notification section on how to set up FCM.
FCM integration is used alongside WebSocket in order to minimize app battery consumption.
Last updated