Package com.marigold.sdk.interfaces
See: Description
-
Interface Summary Interface Description ContentIntentBuilder Implement this interface to build a custom intent to be executed when the notification is tapped <br/><br/> Note: Direct to URI notifications using the <code>_u</code> parameter will never call {@link #build(Context, Bundle)}<br/><br/>Example of usage directing users to <code>SaleActivity</code> when a notification has the custom field special_price
defined.InAppNotificationTappedListener Logger Logging interface to capture logging coming from the Marigold SDK. MessageReadListener Listener to identify when a message was read. NotificationActionTappedListener Listener used to identify when a notification action was tapped <br></br><br></br>For example, if you want to log when a notification action with title 'OK' is tapped. NotificationReceivedListener Listener used to identify when a notification was received <br></br><br></br>For example, if we want to log when receiving notifications with the custom field 'special_price' present, you could implement a listener:
Add your implementation using Marigold.addNotificationReceivedListener<pre> ``` ... val marigold = Marigold() marigold.startEngine(getApplicationContext(), "your sdk key") marigold.addNotificationReceivedListener(MyNotificationReceivedListener()) ... ```class MyNotificationReceivedListener: NotificationReceivedListener { private val TAG = "NotificationLogger" override onNotificationReceived(context: Context?, bundle: Bundle) { if(bundle.containsKey("special_price")) { Log.i(TAG, "Sale Notification received") } } }
NotificationSilencer Implement NotificationSilencer if you want to suppress any received notification to be presented by Marigold<br></br><br></br> Note: Direct to URI notifications using the _u
parameter will never call isSilent<br></br><br></br> You could use this to silence notifications from other providers or Receive a notification to start a special background service<br></br><br></br> Example of usage to silent notifications when the custom keysilent
is present.NotificationTappedListener Listener used to identify when a notification was tapped <br></br><br></br>For example, if you want to log when a notification with the custom field 'special_price' present is tapped. UnreadMessageCountListener Listener to identify when a message was read.