Notification Action Tapped Listener
Listener used to identify when a notification action was tapped
For example, if you want to log when a notification action with title 'OK' is tapped.
You could implement a listener like this:
class MyNotificationActionTappedListener: NotificationActionTappedListener {
private val TAG = "NotificationLogger"
override onNotificationActionTapped(context: Context?, bundle: Bundle?, title: String?, category: String?, actionState: NotificationActionState) {
if(title == "OK") {
Log.i(TAG, "OK action tapped!")
}
}
}
Content copied to clipboard
Add your implementation using Marigold.addNotificationActionTappedListener
...
val marigold = Marigold()
Marigold.startEngine(getApplicationContext(), "your sdk key")
Marigold.addNotificationActionTappedListener(MyNotificationActionTappedListener())
...
Content copied to clipboard
Functions
Link copied to clipboard
abstract fun onNotificationActionTapped(context: Context, bundle: Bundle, title: String, category: String, actionState: NotificationActionState)
Called when the notification is tapped