Android 权限 RECEIVE_BOOT_COMPLETED vs firebase 远程推送通知 vs google 播放策略

Android permission RECEIVE_BOOT_COMPLETED vs firebase remote push notifications vs google play policy

我最近构建了一个使用 firebase 接收推送通知的本机 (web) 应用程序。有两个不同的 React 库,两个教程都包含在清单

   <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

我想知道这是否需要,是否可以保存到应用程序中。是否需要远程推送通知功能?第二个问题是否从 Google Play Policy 的角度保存。我问是因为最近我的应用程序因违反 "Violation of Usage of Android Advertising ID policy and section 4.8 of the Developer Distribution Agreement" 而被从商店中删除。这与此无关,但我还是要询问此权限,以免生气 google 再次播放,因为清单中的此权限听起来有点偷偷摸摸。

我可以提及这两个库/教程。

第一个是这个https://github.com/zo0r/react-native-push-notification

第二个是这个https://medium.com/@yangnana11/how-to-set-up-firebase-notification-in-react-native-app-android-only-4920eb875eae

顺便说一句,无论如何我在清单中没有这样的接收器。 (不知道 firebase 之类的库怎么样)

<receiver android:name=".Broadcast" android:exported="true" android:enabled="true">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED"/>
        </intent-filter>
    </receiver>

RECEIVE_BOOT_COMPLETED是普通权限。放在app里就好了

Though holding this permission does not have any security implications, it can have a negative impact on the user experience by increasing the amount of time it takes the system to start and allowing applications to have themselves running without the user being aware of them.

Protection level: normal

需要此权限才能在设备重新启动时设置警报和其他背景内容,因为所有警报在重新启动后都会被删除。更多信息 here.