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上报

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
}

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2021 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :