MBurger Engagement Platform
User GuideHeadless CMSEngagement Platform
  • 🍔MBurger Engagement Platform 🍔
  • 🍏 iOS Docs
    • Messages
      • Installation
      • Initialization
      • Push notifications
        • Rich Notifications
      • Stylize in app messages
      • Message Metrics
    • Audience
      • Installation
      • Initialization
      • Tracked data
      • Tags
      • Identify a user
      • Location
    • Automation
      • Installation
      • Initialization
      • Triggers
      • Send events
      • View Tracking
  • 📱Android Docs
    • Messages
      • Prerequisites for Push Notifications
      • Installation
      • Initialization
      • Stylization and parameters
      • Push notifications
      • Message Metrics
    • Audience
      • Installation
      • Initialization
      • Tracked data
      • Tags
      • Custom Id
      • Mobile User Id
      • Location Data
    • Automation
      • Installation
      • Initialization
      • Triggers
      • Add events
      • View Tracking
      • Stop/Pause tracking
  • 🔷Flutter Docs
    • Messages
      • Installation
      • Initialization
      • Stylize in app messages
      • Push notifications
        • Rich Notifications
      • Message Metrics
    • Audience
      • Installation
      • Initialization
      • Tracked data
      • Tags
      • Custom Id
      • Mobile User Id
      • Location Data
    • Automation
      • Installation
      • Initialization
      • Triggers
      • Send events
      • View Tracking
Powered by GitBook
On this page

Was this helpful?

  1. Android Docs
  2. Messages

Message Metrics

PreviousPush notificationsNextAudience

Last updated 4 years ago

Was this helpful?

Using MBMessages gives you also the chanche to collect informations about your user and the push, those will be displyed on the dashboard. As described in the prervious paragraph, in order for this to function, you need to configure push notification receivement as described below:

The push service must extend MBurgerFBMessagingService instead of FirebaseMessagingService, then implement this method which is a wrapper around the standard onMessageReceived for Firebase:

override fun onMBMessageReceived(remoteMessage: RemoteMessage, intent: Intent) {
}

Then when you create your notification to create the PendingIntent you should use the Intent provided with this function, you can add more extras or set which class you wish to set the Intent.

intent.setClass(applicationContext, MainActivity::class.java)
intent.putExtra("param", some_parameter)

Then when you call the notify method to show the notification call this API:

MBMessagesMetrics.trackShowPush(applicationContext, intent)

Lastly on the activity you use to call from the notification (mainly your android.intent.action.MAIN and android.intent.category.LAUNCHER activity) call this API on the onCreate method:

MBMessagesMetrics.checkOpenedFromPush(applicationContext, getIntent())
📱
MBurger