Interface FlurryMessagingListener
public interface FlurryMessagingListener
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onNonFlurryNotificationReceived
(Object nonFlurryMessage) If listener is set, Flurry will notify you when a notification has been received that was not sent from Flurry.void
onNotificationCancelled
(FlurryMessage flurryMessage) If listener is set, Flurry will notify you if user has cancelled/dismissed the notification.boolean
onNotificationClicked
(FlurryMessage flurryMessage) If listener is set, Flurry will call this method to notify you a notification has been clicked.boolean
onNotificationReceived
(FlurryMessage flurryMessage) If listener is set, Flurry will call this method to notify you a notification has been received.void
onTokenRefresh
(String refreshedToken) If listener is set, Flurry will notify you if push notification token has been changed.
-
Method Details
-
onNotificationReceived
If listener is set, Flurry will call this method to notify you a notification has been received. If you would like to handle the notification yourself, be sure to return true to notify Flurry you've handled it. If you return false, Flurry will continue with default behavior, which is show the notification if app is in background, and do nothing if app is in foreground. Note: if you handle the notification, you must log the opened and dismissed events to Flurry manually by callingFlurryMessaging.logNotificationReceived(FlurryMessage)
andFlurryMessaging.logNotificationCancelled(FlurryMessage)
- Parameters:
flurryMessage
- the notification- Returns:
- True if you've handled the notification. False if you haven't and want Flurry to handle it
-
onNotificationClicked
If listener is set, Flurry will call this method to notify you a notification has been clicked. If you would like to handle the UI navigation yourself, be sure to return true to notify Flurry you've handled it. If you return false, Flurry will continue with default behavior, which is launch the main or "click_action" activity with theIntent.FLAG_ACTIVITY_NEW_TASK
flag.Note: This will only be called if Flurry generated the notification.
- Parameters:
flurryMessage
- the notification- Returns:
- True if you've handled the notification. False if you haven't and want Flurry to handle it
-
onNotificationCancelled
If listener is set, Flurry will notify you if user has cancelled/dismissed the notification.Note: This will only be called if Flurry generated the notification.
- Parameters:
flurryMessage
- the notification
-
onTokenRefresh
If listener is set, Flurry will notify you if push notification token has been changed.- Parameters:
refreshedToken
- the new token
-
onNonFlurryNotificationReceived
If listener is set, Flurry will notify you when a notification has been received that was not sent from Flurry. Based on the various push providers you have integrated, you may cast the Object to the appropriate type.
-