Retrieve custom parameters from Push/In-App/Inbox

If you want to retrieve custom parameters from Push, In-App or Inbox features, call:

BMA4S.setCustomParametersListener(your-callback-function)

Each time an Push/In-App/Inbox is displayed or clicked, you will receive a response like this one:

{
  "action": "com.ad4screen.sdk.intent.action.CLICKED",
  "categories": [
    "com.ad4screen.sdk.intent.category.PUSH_NOTIFICATIONS"
  ],
  "params": {
    "a4stitle": "",
    "a4sid": "251_530143_16632_3892",
    "collapse_key": "16632",
    "a4scancel": "Cancel",
    "a4scontent": "Rich push with webview",
    "a4sforeground": "y",
    "a4spopup": "y",
    "from": "255322792147",
    "a4surl": "http://google.fr",
    "my-key": "settings",
    "a4sok": "Let's see",
    "a4ssysid": "16632"
  }
}

Here, it's a push which has just been clicked.

action can contains:

com.ad4screen.sdk.intent.action.CLICKED
com.ad4screen.sdk.intent.action.DISPLAYED
com.ad4screen.sdk.intent.action.CLOSED

categories can contains:

com.ad4screen.sdk.intent.category.PUSH_NOTIFICATIONS
com.ad4screen.sdk.intent.category.INAPP_NOTIFICATIONS
com.ad4screen.sdk.intent.category.INBOX_NOTIFICATIONS

All parameters including your custom parameters are inside params (here we have a custom param named 'my-key')

Stop listening for custom parameters

If you don't want to retrieve custom parameters anymore, please call:

BMA4S.removeCustomParametersListener()