Google Play上架被拒解决

因上传用户手机号触犯隐私政策

被拒描述

APK REQUIRES VALID PRIVACY POLICY​

Your app is uploading users’ ​phone number​ information to https://api.appblog.cn without posting a privacy policy in both the designated field in the Play Developer Console and from within the Play distributed app itself.

APK UPLOAD USER’S DATA PRIOR TO USER INTERACTION

Your app is uploading users’ ​phone number​ information to https://api.appblog.cn prior to user interaction (i.e. login).

解决方案

注释如下获取手机号的使用及禁止将手机号塞入HTTP Header上报

public static String getPhoneNum(Context context) {
    String result = "";
    try {
        if (ActivityCompat.checkSelfPermission(context, Manifest.permission.READ_SMS) != PackageManager.PERMISSION_GRANTED &&
                ActivityCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_NUMBERS) != PackageManager.PERMISSION_GRANTED &&
                ActivityCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) {
            return "";
        }
        TelephonyManager telephonyManager = (TelephonyManager) (context.getSystemService(Context.TELEPHONY_SERVICE));
        result = telephonyManager.getLine1Number();
        if (result == null)
            result = "";
    } catch (Exception e) {
        NLog.e(Constants.TAG, Log.getStackTraceString(e));
    }
    return result;
}
上一篇 Android ViewBinding入门
下一篇 Magento 2.3 安装及开发记录
目录
文章列表
1 Android NDK基础19:C++_构造函数属性初始化_new(delete)_静态成员_this指针
Android NDK基础19:C++_构造函数属性初始化_new(delete)_静态成员_this指针
2
AWS ACM 证书管理
AWS ACM 证书管理
3
关于Java中RSA加签解签,私钥加密公钥解密和公钥加密私钥解密代码详解
关于Java中RSA加签解签,私钥加密公钥解密和公钥加密私钥解密代码详解
4
Google Play上架被拒解决
Google Play上架被拒解决
5
Retrofit2学习之七:上传多个文件
Retrofit2学习之七:上传多个文件
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。