This document describes how to quickly integrate the Tencent Push Notification Service SDK into your Android application. You can use the Tencent Push Notification Service on your application after performing the following steps.
Note:To avoid your app from being criticized in a circulated notice or removed from the market by regulatory authorities, be sure to add mobile push related instructions in the Privacy Policy according to the Android Compliance Guide before integrating the Tencent Push Notification Service SDK and initialize the SDK after the user agrees to the Privacy Policy.
Note:To increase the offline reach rate, the Tencent Push Notification Service SDK enables the session keep-alive feature by default. To disable the feature, see here.
XG register push success with token:6ed8af8d7b18049d9fed116a9db9c71ab4aabb65
If the token cannot be found, please check the error code returned by the registration API and troubleshoot as instructed in Error Code.
AppId
and SecretKey
. For more information about how to apply for such information, see the documentation of the vendor channel.AppId
, AppKey
, and AppSecret
for the vendor channel.debug
field in the tpns-configs.json
file to true
and run the following command: ./gradlew --rerun-tasks :app:processReleaseManifest
Then, use the TpnsPlugin
keyword for analysis.
2. Click the sync projects icon.
3. Check whether relevant dependencies exist in External Libraries of the project.
4. If the log displays Execution failed for task ':Paracraft:checkTPNS'
, the Tencent Push Notification Service Android SDK can be updated to a later version. If you do not want to check for updates, add "upgrade": false
to the tpns-configs.json
file, as shown below:
5. If you encounter the version mismatch between the Android Gradle plugin and Gradle version when using the plugin, upgrade the Gradle version by referring to Android Gradle plugin release notes. The table in following figure lists which version of Gradle is required for each version of the Android Gradle plugin.
Was this page helpful?