Skip to main content


If needed, your app users can chat with you to provide you more details about their reported bugs, crashes or feedback. You will be able to fix issues faster and make your customers happier.


Once your app user is registered with Shake, the chat feature is enabled automatically. Each ticket they send you will be a separate conversation.

This feature is tightly integrated with and follows the lifecycle of your User registration, which means that calling Shake.unregisterUser also disconnects the current app user from chat and they won't receive any new messages until registered again.


Shake can notify your app users about new messages sent from the Shake dashboard.

Both remote and local notifications are supported, but are mutually exclusive.

Set up Firebase SDK

Shake uses Firebase for sending push notifications to your Android app.

If you didn't add Firebase to your project yet, follow the official documentation for adding Firebase into the project.

You'll also have to set up Firebase Cloud Messaging in your app.

Forwarding device token to the Shake

To target the specific Android device, Shake needs the device Firebase token.

Forward Firebase token to the Shake by calling Shake.setPushNotificationsToken method on the app start like shown below:

FirebaseMessaging.getInstance().token.addOnCompleteListener(OnCompleteListener { task ->
if (!task.isSuccessful) {
Log.w("Firebase", "Fetching FCM registration token failed", task.exception)
val token = task.result

Presenting notifications to the app users

Shake sends Firebase data push notifications to the device which are not presented by default.

In order to present data notifications to the app users you'll have to use onMessageReceived callback from the FirebaseMessagingService and call Shake.showChatNotification like shown below:

class MyFirebaseMessagingService : FirebaseMessagingService() {
override fun onMessageReceived(remoteMessage: RemoteMessage) {
val id: String? =[ChatNotification.ID]
val userId: String? =[ChatNotification.USER]
val title: String? =[ChatNotification.TITLE]
val message: String? =[ChatNotification.MESSAGE]
if (id != null && userId != null && title != null && message != null) {
val chatNotification = ChatNotification(id, userId, title, message)

Don't forget to request notifications permission or notifications won't be shown

Customizing notification title and icon

If you want to change chat notification title or icon, you can do it by adding metadata in the manifest file inside the application element:

android:resource="@drawable/ic_notification" />
android:resource="@string/app_name" />

Set up Server Key on the Shake dashboard

The last thing you'll have to do is to add Firebase Cloud Messaging Server Key to the Shake Dashboard.

Navigate to the Project Settings → Cloud Messaging on the Firebase and and copy Server Key to the Workspace Administration → App settings on the Shake dashboard.

Local notifications

If for some reason, you don't want to configure remote notifications for your app, Shake can still schedule them locally.

To enable these, you still need to request the user permission, but there is no need for additional steps or code.


Important thing to note is that local notifications are not shown when app is in the background.

Shake uses Shake.setPushNotificationsToken function to determine if the app is configured to receive remote notifications. If that method is called in your app, Shake will disable local notifications and assume that you want to enable remote ones.

Unread messages

If you want to show number of unread chat messages somewhere in your app, you can set the unread messages listener. The listener is called immediately when set and on each change in the number of unread messages for a registered app user:

Shake.setUnreadChatMessagesListener(object : UnreadChatMessagesListener {
override fun onUnreadMessagesCountChanged(count: Int) {
// Update number in your text element

To remove the unread messages listener, use Shake.setUnreadChatMessagesListener(null).