头图

Author: Aurora Senior Engineer - Shi Kunkun

Previous review

In the last article, we shared the comparison between the push channel of various overseas manufacturers and the FCM channel, and learned about the advantages of the manufacturer channel. Then let's teach you how to integrate overseas manufacturer channels step by step.

APP integration strategy for overseas manufacturers channel

After understanding the difference between the manufacturer channel and the FCM channel, the advantages of the manufacturer channel are obvious. In order to improve the delivery rate of APP notifications, it is necessary to integrate the manufacturer channel to make up for the deficiency of the FCM channel. Here, we have sorted out the overseas support of each vendor channel.

图片

So far, in addition to Samsung and vivo, Xiaomi, OPPO, Huawei, and Honor all have their own channel blessings. Among them, Huawei and Honor, domestic and overseas, have already communicated with each other, and there is no difference between the use and integration methods of domestic manufacturers' channels, so I won't repeat them here.

https://docs.jiguang.cn/jpush/client/Android/android_3rd_param

Jiguang Push SDK has packaged the push SDK of major manufacturers, which can facilitate developers to quickly integrate vendor channels without the need to implement the integration of each channel separately. At the same time, it also supports developers to manage push policies and view push data reports in a unified way in the background. Since only Xiaomi and OPPO have different overseas and domestic support. The following focuses on explaining the overseas channels of these two manufacturers.

01. Operation platform

The developer open platforms of the two manufacturers can switch between domestic and international versions through the same platform link.

a. The Xiaomi accounts are interoperable, but the newly created apps are differentiated domestically and overseas. When switching to English, the newly created apps will be synchronized to the overseas app market first. Only in this way can the overseas version SDK be used for message push. However, when the overseas version of the SDK is used on domestic devices, the registration failure will be displayed.

图片

图片

When pushing messages through the operating platform, it needs to be strictly based on the location of the device. Briefly summed up as:

  • If the target user is a domestic user, it needs to be sent through the domestic push operation platform;
  • If the target user is an overseas user, it needs to be sent through the overseas push operation platform;
  • If the target user includes both domestic users and overseas users, you can choose the domestic & foreign push operation platform to push the message at the same time, and the user will not receive it repeatedly;

b. The OPPO account can log in to the overseas version, but the information is not interoperable. You need to re-register the developer information, and you need to provide identification and an international VISA bank card when registering. When you switch languages, you will automatically log out of the current account and then log in again. It should be noted that you must be registered as an enterprise developer before you can use the push function.

图片

When pushing messages through the operating platform, it is also necessary to use different platforms to push messages according to the location of the device. Messages sent by domestic push operation platforms can only be received by domestic devices; messages sent by overseas push operation platforms can only be received by overseas devices;

02. SDK integration

a. The Xiaomi SDK integration distinguishes between the domestic version and the overseas version. The two versions of the SDK cannot coexist in the same APP at the same time. At the same time integration, there will be more conflicts at compile time.

图片

Although it cannot be integrated at the same time, the API used in development is the same, that is, when developers want to support both domestic and overseas, they can directly replace the SDK. One thing to note is that if the overseas version of the SDK is integrated, it must be First, set the data storage area through the MiPushClient.setRegion interface. The optional areas are as follows:

 public enum Region {
Global,//新加坡
Europe,//欧洲德国法兰克福
Russia,//俄罗斯莫斯科
India//印度孟买
}

Then call the MiPushClient.registerPush interface to register the Xiaomi Push service. Otherwise an IllegalArgumentException will be thrown. b. For OPPO, it is relatively simple to adapt to overseas channels. The SDK does not need any changes, and domestic devices are common to overseas devices.

03. Background service development

In terms of background service adaptation, both manufacturers do not need to modify the server SDK, and the adaptation work that needs to be done is the same. According to the location of the device, different api addresses are used to push messages. There is a slight difference in getting the device attribution.

a. Xiaomi provides a separate api interface to query the location of the device.

图片

b. OPPO can be judged according to regid: the prefix of regid has regional abbreviations, CN, IN, RU, etc.; it can distinguish domestic and overseas users. However, no relevant instructions were found on the official documents. The information was learned through official technical support, and the actual verification was indeed the case. The server uses different domain names to push according to domestic and overseas users.

图片

04. Notification delivery effect

a. The delivery effect of Xiaomi's manufacturer channel is consistent with that in China. Even after forcibly stopping the application, you can still receive push messages normally.

b. OPPO manufacturer channel, we learned from OPPO official technical support: "A long connection channel for manufacturers has been added to overseas systems to support sending notification messages through manufacturers. In terms of notification display, the display logic of Google FCM is used. , and forward the received message to FCM, so there will be the same problem as the FCM channel, that is, after "forcibly stopping" the APP, you cannot continue to receive notifications". For this statement, we verified it after getting the overseas version of the real machine. After passing the "Forced Stop" APP, we can receive the notification and display it normally. It should be that the manufacturer has completed the optimization.

05. APP channel distribution

a. Since Xiaomi manufacturers distinguish between domestic and overseas devices, the domestic version of the SDK can only be installed on domestic devices, and the overseas version of the SDK can only be installed on overseas devices. Therefore, when distributing applications, developers need to conduct multi-channel distribution. , the domestic application market uses the domestic version of the SDK. The overseas version of the SDK is used on Google Play.

b. Since the OPPO manufacturer SDK does not distinguish between domestic and foreign versions, it can be used universally. Therefore, there is no need to distribute the APP through different channels for domestic and foreign environments. However, it should be noted that if the overseas application has no domestic main body and is listed on the application store, it must be listed on the OPPO overseas application store in order to use the push normally. Countries supported by overseas app stores are: India, Indonesia, Thailand, Vietnam, the Philippines, Malaysia, and Taiwan.

summary

Jiguang is currently fully compatible and supports overseas manufacturer channels. Using Jiguang Push, you can avoid the complicated integration process and integrate the manufacturer SDK with one click to improve the integration efficiency. See http://www.jiguang.cn for details

About Aurora

Aurora Mobile (NASDAQ: JG), founded in 2011, is a leading customer interaction and marketing technology service provider in China. At the beginning of its establishment, Jiguang focused on providing stable and efficient message push services for enterprises. With its first-mover advantage, it has grown into a mobile message push service provider with a far leading market share. With the continuous strengthening of enterprises' demand for customer contact and marketing growth, Jiguang has proactively launched solutions such as message cloud and marketing cloud to help enterprises achieve multi-channel customer contact and interaction needs, as well as artificial intelligence and big data. The application of marketing technology to help the digital transformation of enterprises.


极光JIGUANG
1.3k 声望1.3k 粉丝

极光(www.jiguang.cn)是中国领先的移动大数据服务商。其团队核心成员来自腾讯、摩根士丹利、豆瓣、Teradata和中国移动等公司。公司自2011年成立以来专注于为app开发者提供稳定高效的消息推送、统计分析、即时通...