首页 > 解决方案 > Remove CALL_LOG and SMS permission in ejected React Native app

问题描述

I tried to remove the CALL_LOG and SMS permission within my React Native app to compliant with Google new policy. However, after multiple tried, I can't seem to get the alert message on Google Dev Console go away. It seem my APK still have not remove these permission. In my Android Manifest, I added

<uses-permission tools:node="remove" android:name="android.permission.CALL_LOG" />
<uses-permission tools:node="remove" android:name="android.permission.SMS" />

Also I tried to search all of my project and see that the CALL_LOG and SMS permission is nowhere to be found. If anyone had successful remove these permission with their ejected RN app can help me, that would be much appreciated.

标签: androidreact-nativeandroid-manifestexpocreate-react-app

解决方案


如果您使用的是 Expo,那么您应该在 app.json 文件中告诉应用程序应该授予哪些权限。如果您未指定应授予的权限,它将尝试授予自己所有权限,例如 READ_SMS。

app.json 权限部分可能如下所示:

"android": {
  "permissions": [
    "RECORD_AUDIO"
  ]
}

有关所有权限的列表和更详细的信息,请参阅以下链接: Expo 权限文档Expo 权限列表


推荐阅读