当前位置:网站首页>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=FP
Return 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);
边栏推荐
猜你喜欢
随机推荐
R语言使用oneway.test函数执行单因素方差分析(One-Way ANOVA)、使用数据集的子集数据进行单因素方差分析(subset函数筛选数据子集)
unity 坑坑001
leetcode:339 嵌套列表权重和
同一块中出现两个 * 就不能正常显示
轮询以及webSocket与socket.io原理
node环境变量配置,npm环境变量配置
Moonbeam于Moonbase Alpha构建新式XCM对EVM跨链功能
Pytorch GPU模型推理时间探讨
R语言ggplot2可视化:使用ggpubr包的ggscatter函数可视化分组散点图、stat_mean函数在分组数据点外侧绘制凸包并突出显示分组均值点、自定会均值点的大小以及透明度
股票量化交易策略:多因子筛选练习
vvic API 接入说明
promise笔记(四)
「软件架构」10种常见的软件架构模式
FFmpeg花屏解决(修改源码,丢弃不完整帧)
不止跑路,拯救误操作rm -rf /*的小伙儿
建筑施工员证怎么考?报名条件及报考时间是什么?
Splitting and merging long markdown documents
百度、四维图新、高德争“鲜”恐后
win11安装deepin20.6双系统(双硬盘)
一颗完整意义的LPWAN SOC无线通信芯片——ASR6601