Postbacks Example

Definition and source code examples for the Postbacks feature.

Warning: This example is provided for informational purposes only. The ADBMobileConfig.json file should be configured in the Adobe Mobile UI. This file should not be modified manually. Using a manually edited configuration file is especially dangerous if you have remote messages configuration enabled.

This section contains the following information:

ADBMobileConfig.json Definition

"messages": [
        "messageId": "79ae37c9-89b9-465e-af7f-d3351771f1dc",
        "template": "callback",
        "payload": { 
            "templateurl": "{}&zip={}&c16={%sdkver%}&c27=cln,{a.PrevSessionLength}",
            "templatebody": "c2RrdmVyPXslc2RrdmVyJX0mY2I9eyVjYWNoZWJ1c3QlfSZjbGllbnRJZD17bi5jbGllbnQuaWR9JnRzPXsldGltZXN0YW1wVSV9JnRzej17JXRpbWVzdGFtcFolfQ==",
            "contenttype": "application/x-www-form-urlencoded", 
            "timeout": 4
        "showOffline": true,
        "showRule": "always",
        "endDate": 2524730400,
        "startDate": 0,
        "audiences": [],
        "triggers": [
                "key": "pageName",
                "matches": "eq",
                "values": [

Source Code

HashMap<String, Object> contextData = new HashMap<String, Object>();
contextData.put("", "bob");
contextData.put("", "90210");
Analytics.trackState("MainMenu", contextData);

Due to the fact that its state is “MainMenu”, this tracking call triggers the above postback message. The URL will replace all template variables with values from the hit. Assuming that the user’s previous session was 132 seconds long and that user is on Android SDK version 4.6.0, the resulting URL would look like this:,132

Parent topic: Postbacks