Push notifications appear outside of your app, making them useful for re-engaging passive users or conveying information about new content or products. Push notifications are supported for both iOS and Android apps. Push notifications use Apple Push Notification Service (APNS) for iOS apps and Google Cloud Messaging (GCM) for Android apps.  

There are two types of push notifications: background notifications that can automatically download a specified collection, and text notifications that can send a message to users even if they aren't using the app. iOS apps support both text notifications and background notifications. Background push notifications are not yet supported on Android devices.

To receive notifications, users must agree to receive push notifications when they launch the app in order to receive background downloads (iOS only) or text notifications.

You can send push notifications using the On-Demand Portal or through APIs (see Integrating third-party systems with AEM Mobile).

A separate method for sending push notifications is available through the Mobile Marketing Dashboard, which requires a separate Marketing Cloud license. See Sending push messages using Marketing Cloud.

 

 

 

Sending push notifications (iOS)

Use the Notifications section of the On-Demand Portal (https://aemmobile.adobe.com) to upload push notification certificate information and to send notifications. Push certificates are stored on a server, not in the app itself.

Specifying push certificates (iOS)

You can send text notifications using either a development app for testing or using a distribution app submitted to Apple. Note the following:

  • If you sign an app with a development certificate but do not have Enable Preflight selected, push notifications will not work; you must enable preflight to test development push.
  • If you want to test push notifications for a distribution app before you submit it to the App Store, create an Ad Hoc provisioning profile. An Ad Hoc provisioning profile lets you install your distribution app (instead of your development app) on a limited number of registered devices.
  • To send push certificates for Enterprise apps that are distributed internally, ask the administrator who creates the Enterprise certificates to create push notification certificates for your specific app, described later in this article.

Notă:

Upload each production and development certificate separately, not as a file that includes multiple push certificates. If you upload a file with multiple certificates, only one of the certificates is detected.

  1. Build an iOS app in the Portal. Make sure that you have used the Apple iOS Developer site to enable your App ID with push and to build the required provisioning profiles and push certificates.

    Use the iOS Developer Center to configure your App ID to enable push notifications and to create the required push notification certificates.

     

    For information on creating the push notification certificates that Apple requires, see the iOS Publishing Guide for AEM Mobile.

  2. Sign in to the Portal (https://aemmobile.adobe.com) using an Adobe ID that includes the Manage Push Certificates permission.

  3. Click Notifications, and make sure that iOS is selected.

  4. In Notifications, select the project (if more than one is available), and click Push Credentials.

     

    Notifications window
  5. Select the app, click Add Credentials, and then specify the .p12 push certificate files and passwords.

    Edit iOS push certification

    When push certificates expire or are within 30 days of expiring, an alert message appears when you sign in to the Notifications section of the Portal. You can then click the edit (pencil) icon to upload your updated certificates.

Sending a background download push notification (iOS)

Use the Notifications option to send background download push notifications. Sending a background download push notification for a collection downloads that collection to devices running OS 8.1 or later and on which users have agreed to receive push notifications. You can schedule a push notification to be triggered at a time you specify. 

  1. Sign in to the Portal (https://aemmobile.adobe.com) using an Adobe ID that includes the Send Background Download Push permission.

  2. Click Notifications.

  3. Click Create, and choose Background Download.

  4. In the Details tab, do the following:

    iOS Application Type. Indicate whether you're sending a push notification to the live Distribution app or to the test Development app. If you created an app with Enable Preflight selected, select the Development option. If you signed an app with a development certificate but do not have Enable Preflight selected, push notifications will not work; you must enable preflight to test development push. Instead of testing push notifications using a development, we recommend that you use an Ad Hoc distribution app for testing the distribution app on a limited number of devices.

    Destination. Specify the App ID. The App ID you specify must match the App ID used in your provisioning profile.

    Collection. Select a collection. Articles in the collection you select can be downloaded in the background.

    Background Notifications
  5. Click Delivery Options, and specify the following options:

    Notification Audience

    Specify the audience of the background notification. For example, you can select Phone to send the notification only to customers who have downloaded your app on a phone.

    You can also send the notification to users who haven't used the app in more than 30 days.

    You can use your Adobe Analytics account to gather information for a subgroup of customers in a CSV file. You can then specify this CSV file when sending your  push notification. For detailed information, see the Digital Publishing Suite article about Segmented Push Notifications.

    Delivery Time

    Indicate whether you want the push notification to be sent immediately or at a date and time you specify.

    Click the Delivery Options tab
  6. Click Create to send or schedule the push notification.

    The scheduled push notification appears in the Notifications window. You can select and cancel the scheduled push notification before the scheduled time.

Sending text notifications (iOS)

By sending custom text messages, you can alert readers of new content in your app.  

You can use In-App Messaging instead of push notifications to send messages to users within the app. In-App Messaging is a premium product. For details, see In-App Messaging.

  1. Sign in to the Portal (https://aemmobile.adobe.com) using an Adobe ID that includes the Send Text Notifications permission.

  2. Click Notifications.

  3. Click Create, and choose Text Notification.

  4. In the Details tab, do the following:

    iOS Application Type. Indicate whether you're sending a push notification to the live Distribution app or to the test Development app. If you created an app with Enable Preflight selected, select the Development option. If you signed an app with a development certificate but do not have Enable Preflight selected, push notifications will not work; you must enable preflight to test development push. Instead of testing push notifications using a development, we recommend that you use an Ad Hoc distribution app for testing the distribution app on a limited number of devices.

    Destination. Specify the App ID. The App ID you specify must match the App ID used in your provisioning profile.

    Text Notification Message. Type the text notification message that you will send to users.

    Action. Specify what happens when the reader taps the text notification on the device. When the user taps the text notification, the app can launch in its current reading position, launch to the "home" content, or launch the app and jump to a specific collection or article in a collection.

    Details tab
  5. Click Delivery Options, and specify the following options:

    Notification Audience

    Specify the target of the text notification. For example, you can select Phone to send the notification only to customers who have downloaded your app on a phone.

    You can also send the notification to users who haven't used the app in more than 30 days.

    You can use your Adobe Analytics account to gather information for a subgroup of customers in a CSV file. You can then specify this CSV file when sending your  push notification. For detailed information, see the Digital Publishing Suite article about Segmented Push Notifications.

    Notification Time

    Indicate whether you want the push notification to be sent immediately or at a date and time you specify.

  6. Click Create to send or schedule the text notification.

    Text notification displayed on an iPad
    Text notification displayed on an iPad

    Text notifications appear on any iOS device in which the app is installed and the user has opted in to receive push notifications.

    If a scheduled text notification has not yet been sent, you can click Cancel to cancel the text notification.

Viewing a history of text notifications

The Notifications section of the Portal displays a history of notifications. Viewing the history requires an Adobe ID with the View Notification History permission.

HTTP Status message of 417

If you receive an HTTP 417 status message when attempting a push notification, an SSL connection with Apple APNS cannot be made using the push notification certificate. Make sure that the push notification certificate is valid and not expired.

Sending push notifications for Enterprise apps

When you create an Enterprise app for internal distribution, you sign it using an Enterprise certificate and provisioning profile. These Enterprise certificates can be used to sign any internal app and do not include a specific Bundle ID.

To send push certificates for Enterprise apps that are distributed internally, ask the administrator who creates the Enterprise certificates to create push notification certificates for your specific app. These push certificates should have the same Bundle ID specified in the Apps section of the Portal. You should then be able to upload those certificates in the Notifications section of the Portal and send push notifications to the Enterprise app.

Sending push notifications (Android)

Sending push notifications to Android app users requires four main steps:

  1. Use the Google Developer Console to configure your app for Google Cloud Messaging.
  2. Build the Android app with push notifications enabled.
  3. Specify certificate settings in the Notifications section of the Portal.
  4. Send the text notification.

Android Push Notifications video

Android Push Notifications video
Watch this video to learn setup instructions for Android push notifications.

Configuring the app for Google Cloud Messaging (Android)

In order to send notifications to your AEM Mobile app, you need to use the Google Developer Console to configure the app, obtain key information, and download a .json file. You can then specify the key information in the Notifications section of the Portal, and you upload this .json file when you build your Android app. This ties the AEM Mobile app to Google Cloud Messaging.

It is important that you use the same Bundle ID for both the Android app and the Google Cloud Messaging configuration.

Notă:

Google changes the Developer Console interface on occasion. If these steps become out of date, please make the necessary adjustments.

  1. Go to the Google Developer Console (https://developers.google.com/mobile/add?platform=android) and sign in using your Google Developer credentials.

  2. Create a new app or choose an existing app.

  3. Specify the Android Package Name. Use the same package name that you use for Bundle ID (usually in com.company.appname format) when building the Android app in On-Demand Services.

  4. Click Choose and Configure Services.

  5. Select Cloud Messaging, and then click Enable Google Cloud Messaging.

  6. Click “Generate configuration files.”

  7. Copy the Server API Key and Sender ID values. Store this information in a safe place. You’ll need this information when you specify credentials in the Notifications section of the Portal. (Use the "Sender ID" value for the "Project Number" option.)

  8. Click “Download google-services.json” and store the file in a safe place. You’ll add this .json file to the Android app .apk file when you build the Android app.

Building an Android app

When you build the Android app, you need to enable push notifications and upload the JSON file that you downloaded from the Google Developer Console.

  1. Use the Apps section of the Portal to build or edit an Android app.

  2. Make sure that you use the same Bundle ID that you specified when configuring the app in the Google Developer Console.

  3. Select Enable Push Notifications.

  4. Click Upload, and then specify the JSON file downloaded from the Google Developer Console.

  5. Build, sign, and load or distribute your Android app.

Specifying certificate information in the Portal (Android)

After you use the Google Developer Console to configure the app for Google Cloud Messaging, you specify the Server API Key and Sender ID (Project Number) values in the Notifications section of the On-Demand Portal.

  1. Sign in to the Portal (https://aemmobile.adobe.com) using an Adobe ID that includes the Manage Push Certificates permission.

  2. Click Notifications.

  3. In Notifications, select the project (if more than one is available), and click Push Credentials. Then click the Android tab.

     

  4. Select the Android app you created, and then click Add Credentials.

  5. Specify the Server API Key and Project Number (called Sender ID in the Google Developer Console).  

    Get the Server API key from the Server API Key value in the Google Developers Portal, not from the google-services.json file.

    If you integrate Google Cloud with Firebase Server and sign in to the Firebase Console, you can obtain this value from the Legacy Server Key value in the Firebase Console (Settings > Cloud Messaging). The Legacy Server Key value is the same as the Server API Key value in the Google Developers Portal.

Sending text notifications (Android)

When you send text notifications to your Android app users, you can specify the method and delivery options. For example, you can send the message only to phone users, and you can schedule a delivery time. At this time, actions such as linking to a specific collection are not supported in Android apps.

You can use In-App Messaging instead of push notifications to send messages to users within the app. In-App Messaging is a premium product. For details, see In-App Messaging.

  1. Sign in to the Portal (https://aemmobile.adobe.com) using an Adobe ID that includes the Send Text Notifications permission.

  2. Click Notifications, and then click Android.

  3. Click Create > Text Notification.

  4. In the Details tab, do the following:

    Destination App ID. Specify the App ID. The App ID you specify must match the Bundle ID used when configuring your app in Google Developer Console.

    Text Notification Message. Type the text notification message that you will send to users.

  5. Click Delivery Options, and specify the following options:

    Notification Audience

    Specify the target of the text notification. For example, you can select Phone to send the notification only to customers who have downloaded your app on a phone. You can also send the notification to users who haven't used the app in more than 30 days.

    Notification Time

    Indicate whether you want the push notification to be sent immediately or at a date and time you specify.

  6. Click Create to send or schedule the text notification.

    Text notifications appear on any Android device in which the app is installed and the user has opted in to receive push notifications.

    If a scheduled text notification has not yet been sent, you can click Cancel to cancel the text notification.

Notă:

After you send the push notification, check the notification details to make sure that the number of target devices is greater than zero. If the number sent is 0, then it's likely that you have the incorrect Google Cloud Marketing API key. Make sure that you get the key from the Google console, not from the the google-services.json file, as described previously.

Această lucrare este oferită sub licență Atribuire-Necomercial-FărăModificări 3.0 Ne-adaptată Creative Commons  Postările pe Twitter™ şi Facebook nu sunt acoperite de condiţiile de licenţiere Creative Commons.

Prevederi legale   |   Politică de confidențialitate online