Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RN 安卓应用 在腾讯应用开放平台上架被拒 (原因:获取Android_ID)如何解决 #13220

Closed
n1wd opened this issue Feb 3, 2023 · 5 comments
Labels
F-react Framework - React T-rn Target - 编译到 React Native V-3 Version - 3.x

Comments

@n1wd
Copy link

n1wd commented Feb 3, 2023

相关平台

React Native

使用框架: React

复现步骤

#1、使用 RN 开发安卓应用(使用了Taro 原生 React Native 壳子 https://github.com/NervJS/taro-native-shell/)
#2、开发好安卓应用(项目本身未使用获取Android_ID代码)
#3、在腾讯应用开放平台申请上架(https://app.open.qq.com/)
#4、上架过程中因隐私问题被拒
#5、上架被拒原因:同意隐私政策前 获取Android_ID

期望结果

在同意隐私政策后适时获取Android_ID

实际结果

程序运行后会直接获取Android_ID

环境信息

👽 Taro v3.5.11


  Taro CLI 3.5.11 environment info:
    System:
      OS: macOS 12.5
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 19.0.1 - /opt/homebrew/bin/node
      Yarn: 1.22.19 - /opt/homebrew/bin/yarn
      npm: 8.19.2 - /opt/homebrew/bin/npm
    npmPackages:
      @tarojs/cli: 3.5.11 => 3.5.11 
      @tarojs/components: 3.5.11 => 3.5.11 
      @tarojs/helper: 3.5.11 => 3.5.11 
      @tarojs/plugin-framework-react: 3.5.11 => 3.5.11 
      @tarojs/plugin-platform-alipay: 3.5.11 => 3.5.11 
      @tarojs/plugin-platform-jd: 3.5.11 => 3.5.11 
      @tarojs/plugin-platform-qq: 3.5.11 => 3.5.11 
      @tarojs/plugin-platform-swan: 3.5.11 => 3.5.11 
      @tarojs/plugin-platform-tt: 3.5.11 => 3.5.11 
      @tarojs/plugin-platform-weapp: 3.5.11 => 3.5.11 
      @tarojs/react: 3.5.11 => 3.5.11 
      @tarojs/rn-runner: 3.5.11 => 3.5.11 
      @tarojs/router: 3.5.11 => 3.5.11 
      @tarojs/runtime: 3.5.11 => 3.5.11 
      @tarojs/shared: 3.5.11 => 3.5.11 
      @tarojs/taro: 3.5.11 => 3.5.11 
      @tarojs/taro-h5: 3.5.11 => 3.5.11 
      @tarojs/taro-rn: 3.5.11 => 3.5.11 
      @tarojs/webpack5-runner: 3.5.11 => 3.5.11 
      babel-preset-taro: 3.5.11 => 3.5.11 
      eslint-config-taro: 3.5.11 => 3.5.11 
      expo: ~46.0.1 => 46.0.16 
      react: ^18.0.0 => 18.2.0 
      react-native: ^0.69.3 => 0.69.6 


补充信息

#行为阶段 同意隐私政策前
#行为名称 获取Android_ID
#个人信息相关 否
#触发频率(次/秒)1
#主体类型 SDK
#主体名称 expo-cli
#包名 expo
#函数调用栈 "android.provider.Settings$Secure.getString(android.content.ContentResolver,java.lang.String)
expo.modules.application.ApplicationModule.getConstants(ApplicationModule.kt:60)
expo.modules.adapters.react.NativeModulesProxy.getConstants(NativeModulesProxy.java:107)
com.facebook.react.bridge.JavaModuleWrapper.getConstants(JavaModuleWrapper.java:142)
com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
android.os.Handler.handleCallback(Handler.java:873)
com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)"

以上为腾讯开放平台反馈的SDK行为数据,供参考

此外:查代码发现大概率是框架本身在默认情况下获取了Android_ID造成,该如何解决?

@taro-bot2 taro-bot2 bot added F-react Framework - React T-rn Target - 编译到 React Native V-3 Version - 3.x labels Feb 3, 2023
@zhiqingchen
Copy link
Member

image
image

也就是expo-application会读取ANDROID_ID
然后expo-sensor在应用启动的时候就会通过onHostResume事件注册传感器监听
而小米市场认为传感器数据也属于个人敏感信息

打下补丁

(来自交流群5)

@n1wd
Copy link
Author

n1wd commented Feb 3, 2023

感谢,我尝试一下

@n1wd
Copy link
Author

n1wd commented Feb 7, 2023

问题已解决,应用商店审核通过。大家有同样问题的,可以借鉴

@n1wd n1wd closed this as completed Feb 7, 2023
@jsonchou
Copy link

jsonchou commented Mar 4, 2023

https://juejin.cn/post/7166090887821262861

需要修改react native 源代码。
否则,小米无根本法审核通过,打patch也无用,根本无解。
自己的包,没有调用链。

  android.hardware.SensorManager.registerListener(SensorManager.java:889)
  android.hardware.SensorManager.registerListener(SensorManager.java:764)
  com.facebook.react.common.ShakeDetector.start(ShakeDetector.java:60)
  com.facebook.react.devsupport.DevSupportManagerBase.reload(DevSupportManagerBase.java:1092)
  com.facebook.react.devsupport.DevSupportManagerBase.reloadSettings(DevSupportManagerBase.java:721)
  com.facebook.react.devsupport.DevSupportManagerBase.setDevSupportEnabled(DevSupportManagerBase.java:593)
  com.facebook.react.ReactInstanceManager.onHostResume(ReactInstanceManager.java:671)
  com.facebook.react.ReactInstanceManager.onHostResume(ReactInstanceManager.java:629)
  com.facebook.react.ReactDelegate.onHostResume(ReactDelegate.java:53)
  com.facebook.react.ReactActivityDelegate.onResume(ReactActivityDelegate.java:120)
  java.lang.reflect.Method.invoke(Native Method)
  expo.modules.ReactActivityDelegateWrapper.invokeDelegateMethod(ReactActivityDelegateWrapper.kt:237)
  expo.modules.ReactActivityDelegateWrapper.onResume(ReactActivityDelegateWrapper.kt:126)
  com.facebook.react.ReactActivity.onResume(ReactActivity.java:58)
  android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1355)
  android.app.Activity.performResume(Activity.java:7178)
  android.app.ActivityThread.performNewIntents(ActivityThread.java:3285)
  android.app.ActivityThread.handleNewIntent(ActivityThread.java:3299)
  android.app.ActivityThread.-wrap14(Unknown Source:0)
  android.app.ActivityThread$H.handleMessage(ActivityThread.java:1999)
  android.os.Handler.dispatchMessage(Handler.java:106)
  android.os.Looper.loop(Looper.java:164)
  android.app.ActivityThread.main(ActivityThread.java:6843)
  java.lang.reflect.Method.invoke(Native Method)
  com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

@jsonchou
Copy link

jsonchou commented Mar 4, 2023

违规收集个人信息
APP以隐私政策弹窗的形式向用户明示收集使用规则,未经用户同意,存在收集传感器的行为。

APP向用户明示SDK的收集使用规则,未经用户同意,SDK存在ReactNative,expo.modules.ReactNativeHostWrapperBase获取传感器的行为。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-rn Target - 编译到 React Native V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

3 participants