In Android Demo, if you wanna to config the offline push, you need to change the demo's variant to use different SDK. The information about variants can read it by offical doc.
1. Use Getui (https://getui.com/) in mainland China
Change variant to Getui, default configuration like GetuiDebug/GetuiRelease.
The configuration: According to its documentation, make corresponding configurations, and pay attention to multi-vendor configurations. Then modify the following file contents:
manifestPlaceholders = [
GETUI_APPID : "",
XIAOMI_APP_ID : "",
XIAOMI_APP_KEY : "",
MEIZU_APP_ID : "",
MEIZU_APP_KEY : "",
HUAWEI_APP_ID : "",
OPPO_APP_KEY : "",
OPPO_APP_SECRET: "",
VIVO_APP_ID : "",
VIVO_APP_KEY : "",
HONOR_APP_ID : "",
]
2. Use FCM (Firebase Cloud Messaging) in overseas regions
Change variant to FCM, default configuration like FCMDebug/FCMRelease.
According to the integration guide of FCM, replace the following files:
Currently, the SDK is designed to directly control the display content of the push banner by the client. When sending a message, set the input parameter offlinePushInfo. If is the forwarding message, need to modify this:
OfflinePushInfo offlinePushInfo = new OfflinePushInfo();
offlinePushInfo.setTitle("OfflineMessageTitle");
offlinePushInfo.setDesc("OfflineMessageDesc");
According to actual needs, you can enable the offline push function after completing the corresponding client and server configurations.
The Android Demo send location messages by Tencent Location Services. So you need to config the mapAppKey and mapBackUrl. You'd better read offical doc first.
public static String mapAppKey = "",
mapBackUrl = "http://callback";
Once the configuration is complete, you can enable the map function.