Configuration steps for Android

Once the package is installed, you can define your Android app settings in Adobe Campaign Classic.

NOTE

To learn how to configure your app for iOS and how to create a delivery for iOS, refer to this section.

Key steps are:

  1. Configure the Android external account
  2. Configure the Android service
  3. Create the mobile app in Campaign
  4. Extend the app schema with additional data

You will then be able to create an Android rich notification.

Configuring Android external account

For Android, two connectors are available:

  • The V1 connector which allows one connection per MTA child.
  • The V2 connector which allows simultaneous connections to the FCM server to improve throughput.

To choose which connector you want to use, follow these steps:

  1. Go to Administration > Platform > External accounts.

  2. Select the Android routing external account.

  3. In the Connector tab, fill in the JavaScript used in the connector field:

    For Android V2: https://localhost:8080/nms/jsp/androidPushConnectorV2.js

    NOTE

    You can also configure it as follow https://localhost:8080/nms/jsp/androidPushConnector.js but we advise you to use version 2 of the connector.

  4. For Android V2, one additional parameter is available in the Adobe Server configuration file (serverConf.xml):

    • maxGCMConnectPerChild: Maximum limit of parallel HTTP requests to the FCM initiated by each child server (8 by default).

Configuring Android service

  1. Go to the Profiles and Targets > Services and subscriptions node and click New.

  2. Define a Label and an Internal name.

  3. Go to the Type field and select Mobile application.

    NOTE

    The default Subscriber applications (nms:appSubscriptionRcp) target mapping is linked to the recipients table. If you want to use a different target mapping, you need to create a new target mapping and enter it in the Target mapping field of the service. For more on creating target mapping, refer to the Configuration guide.

  4. Then click the Add button to select the application type.

  5. Create your Android application. For more on this, refer to this section.

Creating Android mobile application

After creating your service, you now need to create your Android application:

  1. From your newly created service, click the Add button to select the application type.

  2. Select Create an Android application and enter a Label.

  3. Make sure the same Integration key is defined in Adobe Campaign and in the application code via the SDK. For more on this, refer to: Integrating Campaign SDK into the mobile application.

    NOTE

    The Integration key is fully customizable with string value but needs to be exactly the same as the one specified in the SDK.

  4. Select the API version: HTTP v1 or HTTP (legacy). These configurations are detailed in this section

  5. Fill in the Firebase Cloud Messaging the Android connection settings fields.

  6. Click Finish then Save. Your Android application is now ready to be used in Campaign Classic.

By default, Adobe Campaign saves a key in the User identifier (@userKey) field of the Subscriber applications (nms:appSubscriptionRcp) table. This key enables you to link a subscription to a recipient. To collect additional data (such as a complex reconciliation key), you need to apply the following configuration:

Select the API version

After creating service and a new mobile application, you need to configure your mobile application depending on the chosen API version.

  • HTTP v1 configuration is detailed in this section.
  • HTTP (legacy) configuration is detailed in this section.

Configure HTTP v1 API

To configure the HTTP v1 API version, follow the steps below:

  1. In your Mobile application creation wizard window, select HTTPV1 in the API version drop-down.

  2. Click Load project json file to extract projet details… to load directly your JSON key file. For more information on how to extract your JSON file, refer to this page.

    You can also enter manually the following details:

    • Project Id
    • Private Key
    • Client Email

  3. Click Test the connection to check that your configuration is correct and that the marketing server has access to the FCM.

    CAUTION

    For Mid-Sourcing Deployment, the Test connection button will not check if the MID server has access to the FCM server.

  4. As an option, you can enrich a push message content with some Application variables if needed. These are fully customizable and a part of the message payload sent to the mobile device.

  5. Click Finish then Save. Your Android application is now ready to be used in Campaign Classic.

Below are the FCM payload names to further personalize your push notification:

Message type Configurable message element (FCM payload name) Configurable options (FCM payload name)
data message N/A validate_only
notification message title, body, android_channel_id, icon, sound, tag, color, click_action, image, ticker, sticky, visibility, notification_priority, notification_count
validate_only


Configure HTTP (legacy) API

To configure the HTTP (legacy) API version, follow the steps below:

  1. In your Mobile application creation wizard window, select HTTP (legacy) in the API version drop-down.

  2. Enter the Project key that was provided by the developer of the mobile application.

  3. As an option, you can enrich a push message content with some Application variables if needed. These are fully customizable and a part of the message payload sent to the mobile device.

    In the following example, we add title, imageURL and iconURL to create rich push notification and then provides the application with the image, title and icon to display within the notification.

  4. Click Finish then Save. Your Android application is now ready to be used in Campaign Classic.

Below are the FCM payload names to further personalize your push notification:

Message type Configurable message element (FCM payload name) Configurable options (FCM payload name)
data message N/A dryRun
notification message title, body, android_channel_id, icon, sound, tag, color, click_action
dryRun

Extend the appsubscriptionRcp schema

You need to extend the appsubscriptionRcp to define new additional fields to store parameters from the app in Campaign database . These fields will be used for personalization for example. To do this:

  1. Create an extension of the Subscriber applications (nms:appsubscriptionRcp) schema and define the new fields. Learn more about schema extension in this page

  2. Define the mapping in the Subscription parameters tab.

    CAUTION

    Make sure the configuration names in the Subscription parameters tab are the same as those in the mobile application code. Refer to the Integrating Campaign SDK into the mobile application section.

Creating an Android rich notification

With Firebase Cloud Messaging, you can choose between two types of messages:

  • Data message, handled by the client app.

    Messages are sent directly to the mobile application which will generate and display the android notification to the device. Data messages contain only your custom application variables.

  • Notification message, handled automatically by the FCM SDK.

    FCM automatically displays the message on your users’ devices on behalf of the client app. Notification messages contain a predefined set of parameters and options but can still be further personalized with custom application variables.

For more information on Firebase Cloud Messaging messages types, refer to FCM documentation.

Creating a data message

  1. Go to Campaign management > Deliveries.

  2. Click New.

  3. Select Deliver on Android (android) in the Delivery template drop-down. Add a Label to your delivery.

  4. Click To to define the population to target. By default, the Subscriber application target mapping is applied. Click Add to select your service.

  5. In the Target type window, select Subscribers of an Android mobile application and click Next.

  6. In the Service drop-down, select your previously created service then application and click Finish.
    The Application variables are automatically added depending on what was added during the configuration steps.

  7. Select data message as Message Type.

  8. Edit your rich notification.

  9. You can add information in your previously configured Application variables if needed. Application variables needs to be configured in the Android service and are a part of the message payload sent to the mobile device.

  10. Click Save and send your delivery.

The image and web page should be displayed in the push notification when received on the subscribers’ mobile Android devices.

Creating a notification message

NOTE

Additional options for notification message are only available with HTTP v1 API configuration. For more on this, refer to this section.

  1. Go to Campaign management > Deliveries.

  2. Click New.

  3. Select Deliver on Android (android) in the Delivery template drop-down. Add a Label to your delivery.

  4. Click To to define the population to target. By default, the Subscriber application target mapping is applied. Click Add to select your service.

  5. In the Target type window, select Subscribers of an Android mobile application and click Next.

  6. In the Service drop-down, select your previously created service then application and click Finish.

  7. Select notification message as Message Type.

  8. Add a title and edit your message. Personalize your push notification with the Notification options:

    • Channel ID: Set your notification’s channel ID. The app must create a channel with this channel ID before any notification with this channel ID is received.
    • Sound: Set the sound to play when the device receives your notification.
    • Color: Set your notification’s icon color.
    • Icon: Set the notification’s icon to display on your profiles’ devices.
    • Tag: Set the identifier used to replace existing notifications in the notification drawer.
    • Click action: Set the action associated with a user click on your notification.

    For more on the Notification options and how to fill these fields, refer to FCM documentation.

  9. If your application is configured with HTTP v1 API protocol, you can further personalize your push notification with the following HTTPV1 additional options:

    • Ticker: Set the ticker text of your notification. Only available for devices set to Android 5.0 Lollipop.
    • Image: Set the image’s URL to be displayed in your notification.
    • Notification Count: Set the number of new unread information to display directly on the application icon.
    • Sticky: Set to true or false. If set to false, the notification is automatically dismissed when the user clicks it. If set to true, the notification is still displayed even when the user clicks it.
    • Notification Priority: Set the priority levels of your notification to default, minimum, low or high. For more on this, refer to FCM documentation.
    • Visibility: Set the visibility levels of your notification to public, private or secret. For more on this, refer to FCM documentation.

    For more on the HTTP v1 additional options and how to fill these fields, refer to FCM documentation.

  10. You can add information in your previously configured Application variables if needed. Application variables needs to be configured in the Android service and are a part of the message payload sent to the mobile device.

  11. Click Save and send your delivery.

The image and web page should be displayed in the push notification when received on the subscribers’ mobile Android devices.

On this page