Multi-Package Name Push Feature

Last updated: 2020-07-10 15:25:05

    For various types of Android apps, especially Android games, it is a common practice in business operations to customize versions for different channels and use different package names; however, this will lead to excessive workload for subsequent message pushes, as each package requires separate push, which is time-consuming and laborious and makes it difficult to achieve precise push and high efficiency.
    The new "multi-package name push" feature of TPNS is a convenient solution to this problem. After this feature is enabled, you can easily add a multi-package name for different channels, and then one message push is enough to reach all channels.

    Scenarios

    For operational promotions, a game vendor needs to publish an event announcement to all game players. The game is released in multiple app markets (such as CoolAPK, Anzhi, Wandoujia, and 360) with different package names. The multi-package name push feature can be used in this case. After it is enabled, when a push is sent, the event announcement can be received by all packages at the same time.

    Preparations

    Configuring in console

    1. Log in to the TPNS Console and enter the Product Management page.

    2. Select the application for which to configure multi-package name and click Configuration Management.

    3. If the application does not have a master package name, you need to enter one and then click Add Package Name to enter a package name.

    4. If the application already has a master package name, click Edit to enter package name management, and click Add to enter a package name.

    Up to 50 package names can be configured.

    Configuring vendor channel for multi-package name

    If your application has multiple package names, when you need to deliver messages to package names through vendor channels, you need to apply for a vendor key for each package name and configure it on the configuration management page in the console.
    Taking Huawei as an example, if the application has multiple package names configured, multiple key configurations will appear after the Huawei channel is enabled, and you need to complete the configuration for each package name; otherwise, messages to devices under a package name with incomplete configuration will be sent through the TPNS channel after multi-package name push is enabled.

    Integrating the SDK

    After configuring a package name, get the AccessID and AccessKey, and configure as instructed in Android SDK Integration Guide or the Quick Integration process in the console.

    Getting Started

    Console

    After the above configuration is completed and confirmed, you can enable the multi-package name push feature in Message Push > Create Push > Advanced Settings in the console as shown below:

    After multi-package name push is enabled, a push will be delivered to devices that match the push target under all package names.

    The multi-package name push feature is available only to Android. If a vendor channel corresponding to a package name is not configured, messages to devices registered under the package name will be delivered through the TPNS channel.

    REST API

    Set multi_pkg to true in the optional parameter of the REST API to enable multi-package name push. For more information, please see Push API Parameter Description.
    Below is a sample push:

    {
        "audience_type": "token",
        "token_list": [
            "05da87c0ae5973bd2dfa9e08d884aada5bb2"
        ],
        "message_type": "notify",
        "multi_pkg":true,
        "message": {
            "title": "Push title",
            "content": "Push content",
            "android": {
                 "custom_content":"{\"key\":\"value\"}"
            }
        }
    }

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help