如果我只在Google Play商店中发布,是否需要针对Google Play服务的android.permission.WAKE_LOCK? [英] Do I need android.permission.WAKE_LOCK for Google Play Services if I only release in Google Play Store?
问题描述
我正在尝试整合Google Analytics for Android。根据 文档 ,它要求添加 android.permission.WAKE_LOCK
(提供下面的注释注释)。我不明白这一点。如果我只在 Google Play商店中发布应用,那么我是否仍然需要这个?
如果这不是绝对必要的,我真的不想问用户额外的权限。
<! - 在非Google Play设备上进行可靠的本地分派的可选许可 - >
<使用权限android:name =android.permission.WAKE_LOCK/>
特别是,我不明白这个音符实际上意味着什么 here :
可选地,可以请求WAKE_LOCK权限以改善在非Google Play设备上的调度。
允许使用PowerManager的WakeLocks让处理器免于睡眠或屏幕变暗。
在Google Play设备上,后台服务几乎总是作为Google Play服务运行,因此不需要 WAKE_LOCK
。
在非Google Play设备上, WAKE_LOCK
有助于保持G的调度流程/服务oogle Analytics存活,所以它有更多的机会来报告/上传数据。
编辑
< blockquote>
另外,还不清楚权限组中的危险权限会发生什么,这些权限组不是用户可以通过设置控制的权限组,例如 SYSTEM_TOOLS
。
https://commonsware.com/blog/2015/06/02/random-musings-m-developer-preview-bad.html p>
I am trying to integrate Google Analytics for Android. As per the documentation here, it asks to add android.permission.WAKE_LOCK
(provides the comment note below). I dont understand it clearly. If I am releasing the app ONLY in the Google Play Store, do I still need this?
I really do not want to ask users for an additional permission if this is not absolutely necessary.
<!-- Optional permission for reliable local dispatching on non-Google Play devices -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
In particular, I do not understand what this note actually means here:
Optionally a WAKE_LOCK permission can be requested to improve dispatching on non-Google Play devices.
Allows using PowerManager WakeLocks to keep processor from sleeping or screen from dimming.
On Google Play devices, a background service is almost always running as "Google Play Services", so WAKE_LOCK
is not required.
On non-Google Play devices, WAKE_LOCK
helps keeping the dispatching process / service of Google Analytics alive so it has more chances to report / upload data.
EDIT
Also, it is unclear what happens to dangerous permissions in permission groups that are not ones that the user can control via Settings, such as
SYSTEM_TOOLS
.
https://commonsware.com/blog/2015/06/02/random-musings-m-developer-preview-bad.html
这篇关于如果我只在Google Play商店中发布,是否需要针对Google Play服务的android.permission.WAKE_LOCK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!