Firebase additional permissions. Is user asked for acceptance

二次信任 提交于 2019-12-07 10:41:04

问题


I'm currently working on integrating Firebase Analytics into my android app. The problem that I'm encountering is that Firebase adds some new permissions. These permissions are

permission.WAKE_LOCK
com.google.android.c2dm.permission.RECEIVE

My question is: What happens when the user wants to (automatically) update my app in pre Marshmallow versions? Is he asked for permission or not, because it is a normal permission?

In post Marshmallow the documentation is quite clear. It simply doesn't ask the user at all, because it is a normal permission (https://developer.android.com/guide/topics/security/normal-permissions.html).


回答1:


no WAKE_LOCK is not type of danger permission and user are asked only for danger permissions. as you can read more about this here Types Of permissions




回答2:


On Android it is not possible to reliably start a service from a broadcast receiver w/o the use of wakelock for the hand off period from the receiver to the service. To support this common scenario Android provides WakefulBroadcastReceiver class. One of the objective of Firebase Analytics is to accurately measure your app. To do so it needs to a properly handle the data you provide and therefore required WAKE_LOCK permissions. Firebase Analytics is also built to either provide reliable data or no data at all so if your app is missing the WAKE_LOCK permission Firebase Analytics will refuse to report any data.



来源:https://stackoverflow.com/questions/38200738/firebase-additional-permissions-is-user-asked-for-acceptance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!