All Products
Search
Document Center

Mobile Platform as a Service:Create a message - Simple push

Last Updated:Feb 02, 2024

Important

Since March 18th, 2022, mPaaS MPS console has been upgraded. On the new console, the push types have been integrated and optimized from the previous four types (simple push, template push, multiple push and broadcast push) to two types (simple push and multiple push). The upgraded simple push covers the capabilities of the original simple push and template push; the upgraded multiple push covers the capabilities of the original multiple push and broadcast push.

Simple push refers to pushing a message to an individual user or device. When you pushing messages in this mode, you can either customize messages or create messages based on a predefined message template.

Customizing message is applicable for the scenarios of pushing messages to a few targets, such as verifying the validity of Apple Push certificate and checking whether the Android Push SDK is correctly integrated. The message template is suitable for the scenario of pushing messages to multiple targets in multiple times. That is to verify and test the template function by creating a template-based message through the console before the template function is automatically or widely used.

Note
  • The messages are pushed immediately after they are created. You cannot delete or modify them.

  • Since manual operations are required, we recommend you push messages through the console in the scenarios requiring low-frequency message push, such as system verification, operation support, and temporary emergency requirement.

The following sections describe how to create a simple push message in the console.

Prerequisites

  • To push messages to iOS devices, you should have integrated MPS iOS SDK (see Integrate iOS SDK) and configured the iOS push certificate on the Channel configuration page in the mPaaS console. For more information, see Configure iOS push channel.

  • To push messages through the Android vendor channels (also known as third-party channels), you should have integrated MPS Android SDK (see Integrate Android SDK), integrated relevant vendor channels (see Integrate vendor push channels) and completed corresponding push channel setting on the Channel configuration page in the mPaaS console. For more information, see Channel configuration.

Procedure

  1. Log in to the mPaaS console, select the target app, and go to the Message Push Service > Message management page.

  2. Click the Create message push task button, and in the pop-up dialog box, select the Simple push tab.

  3. On the simple push tab page, configure the basic information of the message. The configuration items are as follows:

    Parameter

    Required

    Description

    Message type: silent message

    Yes

    Whether to display the message:

    • Yes: Indicates that the message will not be displayed in any form on the target device, and user has no sense about it.

    • No: Indicates that the message will be displayed in the notification bar.

    For Android devices, you need to perform different operations according to the push channel that you have selected:

    • MPS channel: This parameter is sent to the client as a reference field. You need to parse the message body and get the content of this field, then control the display of the message.

    • Vendor channel: This parameter is sent to the target device as a field. The device vendor's system will then parse the content of this field, and control the display of the message. You do not need to perform any other operations.

    For iOS devices, the display of messages is controlled by the device vendor’s system. You do not need to perform any other operations.

    Message content creation method

    Yes

    Create the message in either of the following ways:

    • Create: Customizes message content, including message title, body and the presentation style.

    • Use a template: Uses the predefined template.

    Template

    Yes

    Choose a message template from templates listed on the Message templates page.

    Note

    It is required only when you choose to create the message based on a template.

    Template placeholder

    Yes

    Enter variable values in the template. The system provides configuration options for placeholders in the selected template.

    Push dimension

    Yes

    Select the message delivery mode:

    • Users: Push messages by user ID. You need to call the bind API to bind the user ID with device ID. For more information about the binding API, see Client APIs.

    • Android: Push messages by Android device ID.

    • iOS: Push messages by iOS device ID.

    User ID/Device ID

    Yes

    Input the corresponding user ID or device ID according to the push dimension you chose.

    • When the push dimension is Android, input the Ad-token.

    • When the push dimension is iOS, input the Device Token.

    • When the push dimension is user, input the actual user ID, that is the value of userid passed in when you called the binding API.

    • If there is any space in the device ID obtained from sources such as logs, you need to delete the space.

    Push priority of Android message channels

    Yes

    Only available for Android push platform.

    • Vendor channels preferred: Vendor channels are preferred. If vendor channels are integrated, messages are pushed through the corresponding vendor channels; if no vendor channel is integrated to the app, the messages are pushed through MPS self-built channel.

    • MPS channel: MPS uses the self-built channel to push messages.

    For Android devices, this parameter specifies whether to push messages through an MPS self-built channel or vendor channel. For iOS devices, you do not need to set this parameter (iOS push belongs to vendor channel push).

    Display style

    Yes

    The style that how the message is displayed on the client. You can choose any one of the following three styles: Default (short text), Big text, and Rich text.

    • Default: This style is suitable for messages with concise and clear content. The message of this style contains title and text only. It is recommended to keep the length of the message text within 100 characters, including custom parameters and symbols.

    • Big text: This style is suitable for messages with long text, such as information and news messages, so users can quickly obtain information without opening the application. The message of this style contains title and text only. It is recommended to keep the length of the message text within 256 characters, including custom parameters and symbols.

    • Rich text: This style supports the messages containing icon and image, suitable for the messages with various content. To ensure good message presentation effect, it is better to keep the text within two lines.

    Message title

    Yes

    Enter the title of the message with no more than 200 characters. The message display effect can be previewed in the preview area.

    Message content

    Yes

    Enter the message boy with no more than 200 characters. The message display effect can be previewed in the preview area.

    Icon

    No

    The icon displayed on the right of the message, which can be JPG, JPEG or PNG image. Enter the public accessible URL of the icon here.

    If you only provide the default icon URL while no materials are uploaded for the corresponding vendor channels, the default icon will be automatically pulled and used for the messages pushed through the vendor channels. Since the vendor channels have different requirements on the icon material, it is suggested to upload the material for each vendor channel separately according to their requirements.

    • Default icon: The suggested size is 140 * 140px, not exceeding 50 KB.

    • OPPO icon: The suggested size is 140 * 140px, not exceeding 50 KB.

    • Xiaomi icon: The suggested size is 120 * 120px, not exceeding 50 KB.

    • Huawei icon: The suggested size is 40 * 40dp, not exceeding 512 KB.

    • FCM icon: If no specific requirement applies, the default icon will be automatically used.

    Large image

    No

    The image displayed at the lower part of the message, which can be JPG, JPEG or PNG image. Enter the public accessible URL of the image here.

    If you only provide the default image URL while no materials are uploaded for the corresponding vendor channels, the default large image will be automatically pulled and used for the messages pushed through the vendor channels. Since the vendor channels have different requirements on the image, it is suggested to upload the material for each vendor channel separately according to their requirements.

    • Default large image: The suggested size is 876 * 324px, not exceeding 1 MB.

    • OPPO large image: The suggested size is 876 * 324px, not exceeding 1 MB.

    • Xiaomi large image: The suggested size is 876 * 324px, not exceeding 1 MB.

    • iOS large image: Supports custom images, without limitation on image size.

    • FCM large image: If no specific requirement applies, the default image will be automatically used.

    Push mode

    Yes

    Select the time to push message:

    • Now: Push the message immediately once the message push task is created.

    • Scheduled: Specify a time to push the message. For example, push the message at 8:00 am on June 19th.

    • Cyclic: Push the message at a specific time cyclically within a period. For example, push the message at 8:00 am every Friday from June 1st to September 30th.

    The preview area is on the right side of the message creation window. To preview the message display effects for different platforms respectively, click Notification, iOS message body and Android message body.

  4. (Optional) Configure the advanced information on demand. In the Advanced information area, complete the following configurations:

    • Redirect upon click: Specify the operation to be performed after a user taps the message on the phone. This parameter is sent to the client as a reference field. You need to implement subsequent operations by referring to the field.

      • Web page: Users will be redirected to a Web page.

      • Custom page: Users will be redirected to a native page.

    • Redirection address: The page to be visited after a user taps the message on the mobile phone. Enter the address according to the option you chose.

      • For Web page, enter the URL of the web page to be visited.

      • For custom page, enter the address of the native page to be visited (Android: ActivityName; iOS: VCName).

    • Custom message ID: Custom message ID is automatically generated by the system to uniquely identify the message in the client's system. It can be customized and a maximum of 64 characters are allowed.

      Note

      Custom message ID is required for silent message only.

    • Valid period: Specify the valid period of the message in seconds. To ensure the message arrival rate, when a message fails to be sent because the device is offline or the user is logged out, MPS will resend it after the device is connected or a user binding request is initiated within the validity period of the message. It is 180 seconds by default.

      Note

      The valid period cannot be shorter than 180 seconds or longer than 72 hours.

    • Extension parameters: Turn the switch on, click Add parameter, set the key/value, and left click on any area of the page to complete setting. The extension parameters are passed to the client together with the message body for your use.

      Extension parameters include the following three types:

      • System extension parameters

        These extension parameters are occupied by the system, and cannot be modified. System extension parameters include notifyType, action, silent, pushType, templateCode, channel, and taskId.

      • System extension parameters with some significance

        These extension parameters are occupied by the system and have some significance. You can configure values of these extension parameters.

        For more information about these parameters, see the following table.

        Parameter

        Description

        sound

        The custom ringtone of the message. The value of this parameter is the path of the ringtone. This parameter is only valid for Xiaomi phones and iPhones.

        badge

        Badge number. Its value is a specific number. This extension parameter will be passed to the client together with the message body.

        • For Android devices, you need to implement the badge logic by yourself.

        • For iOS devices, iOS system automatically implements the badge logic. When a message is pushed to the target mobile phone, the number that you specified in value appears in the badge of the app icon.

        mutable-content

        The APNs custom push identifier. If a pushed message carries this parameter, it indicates that the UNNotificationServiceExtension of iOS10 is supported, otherwise it is a normal push. The value is set to 1.

        badge_add_num

        Accumulative badge number, only available in Huawei channel.

        badge_class

        Activity class corresponding to the desktop app icon in Huawei channel.

        big_text

        Big text style, the value is fixed to 1, and other values are invalid. This parameter is only valid for Xiaomi and Huawei phones.

      • User-defined extension parameters

        All other parameters than system extension parameters and system extension parameters with some significance are user-defined extension parameters. User-defined extension parameters are passed to the client together with the message body for your use.

  5. Click Submit to complete creating the message. The new message will appear in the simple push records.

In addition to console operation, you can also push messages by calling relevant APIs. For more information, see Server APIs.

Relevant operations