当前位置:网站首页>Product Description丨MobPush fast integration method on Android side
Product Description丨MobPush fast integration method on Android side
2022-08-10 17:48:00 【InfoQ】
Development tools: Android Studio
Integration method: Gradle online integration
Android version support: minSdkVersion19
Integration preparation
Register an account
Before using PushSDK, you need to register a developer account on the MobTech official website and obtain the AppKey provided by MobTechand AppSecret, details can be
Click to view the registration process
MobPush background configuration
After registering a MobTech account, it needs to be done in the MobTech backgroundFor the configuration of related information, for details, you can
click to view the specific configuration information
MobPush flow chart

Add configuration
Register MobSDK in project Gradle file
buildscript{
repositories {
// Add MobSDK Maven address
maven {
url "https://mvn.mob.com/android"
}
}
dependencies {
// Register MobSDK
classpath "com.mob.sdk:MobSDK:2018.0319.1724"
}
}
allprojects {
repositories {
//Add MobSDK Maven address
maven {
url "https://mvn.mob.com/android"
}
}Add plugins and extensions to the Gradle file of the project App Module
// Call MobTech SDK
apply plugin: 'com.mob.sdk'
MobSDK {
appKey "replace with appkey"
appSecret"of MobTech's official applicationThe appSecret corresponding to the appkey officially applied by MobTech"
MobPush {}
}Add code in gradle.properties
MobSDK.spEdition=FPReturn the user privacy authorization result (submitPolicyGrantResult)
In order to ensure that your app can meet the relevant compliance requirements of the Ministry of Industry and Information Technology after integrating MobSDK, you should ensure that the app is installed cold for the first time and obtainedAfter the user reads your "Privacy Policy" authorization, call MobSDK.submitPolicyGrantResult to return the privacy agreement authorization result.
On the contrary, if the user does not agree with the authorization of your App's "Privacy Policy", he cannot call MobSDK.submitPolicyGrantResult to return the privacy agreement authorization result.Please refer to the link
Compliance Guidelines
/**
* com.mob.MobSDK.class
* Returns the userPrivacy authorization result
* @param isGranted Whether the user agrees to the privacy agreement
*/
public static void submitPolicyGrantResult(boolean isGranted)Sample code
Note
: The developer can specify the calling location, just call it before using the SDK function. It is strongly recommended that the developer click the application privacy agreement pop-up window at the end user.Called after agreeing the button.
MobSDK.submitPolicyGrantResult(true);边栏推荐
- promise笔记(四)
- 在 Istio 服务网格内连接外部 MySQL 数据库
- 五菱宏光MINI EV,唯一的缺点就是安全性
- JNDI与RMI、LDAP
- 不止跑路,拯救误操作rm -rf /*的小伙儿
- Go-Excelize API源码阅读(六)—— DeleteSheet(sheet string)
- 自动化测试 RobotFramework安装以及使用教程
- R语言使用oneway.test函数执行单因素方差分析(One-Way ANOVA)、使用数据集的子集数据进行单因素方差分析(subset函数筛选数据子集)
- 【Web3 系列开发教程——创建你的第一个 NFT(8)】如何开发一个成功的 NFT 项目 | NFT 社区建设技巧
- mysql包select结果无法同步的问题
猜你喜欢
随机推荐
深度学习培训二笔记
1001 A+B Format (string processing)
redis分布式锁
【接入指南 之 直接接入】手把手教你快速上手接入HONOR Connect平台(上)
在 Istio 服务网格内连接外部 MySQL 数据库
Mysql索引、事务与存储引擎
Talking about Taishan crowdfunding system development technical description and dapp chain crowdfunding system development analysis
验算移位距离和假设的通用性
SQL优化的魅力!从 30248s 到 0.001s
CAS客户端对接
R语言patchwork包将多个可视化结果组合起来、plot_annotation函数以及tag_level参数将组合图用大写字母进行顺序编码、为组合图的标签添加自定义后缀信息(suffix)
document.title获取当前网页的标题
【云原生| Docker】 部署 Django & mysql 项目
不止跑路,拯救误操作rm -rf /*的小伙儿
股票量化交易策略:多因子筛选练习
架构-三层架构:三层架构
leet面试150
JWT 实现登录认证 + Token 自动续期方案
挑战用五行代码轻松集成登录系统,实现单点登录
神经网络的图像识别技术,神经网络识别图像原理









