Android的需要哪些权限调用PowerManager.goToSleep(N)把设备处于睡眠模式? [英] Android What permissions required to call PowerManager.goToSleep(n) put device in sleep mode?

查看:1454
本文介绍了Android的需要哪些权限调用PowerManager.goToSleep(N)把设备处于睡眠模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已设置android.permissions.DEVICE_POWER在我的应用程序的清单。不过抱怨,无论是用户还是程序有此权限时,我打电话PowerManager.gotoSleep(n)的范围内活动。还有什么其他的设置都需要这个工作?由于这是对我的三星ATT手机

Already set android.permissions.DEVICE_POWER in manifest of my app. Still complains that neither user nor process have this permission when I call PowerManager.gotoSleep(n) within activity. What other settings are required for this to work? Thanks This is on My Samsung ATT phone

推荐答案

DEVICE_POWER是2级权限和保护权限,因此它不会提供给任何应用程序,它通过明显的提出要求,顺利拿到这个权限,我们需要有在我们的生成文件平台证书,并共享用户ID清单中设置为系统...

DEVICE_POWER is a level 2 permission and protected permission and hence it is not provided to any app which request it via manifest, to get this permission successfully we need to have Platform certificate in our make file and shared user id set in manifest as system...

LOCAL_CERTIFICATE := platform (makefile entry)

android.uid.system (shared  user id )

心不是解决的办法我环顾四周,还没有发现任何...

There isnt a way around this i have looked around havent found any ...

这篇关于Android的需要哪些权限调用PowerManager.goToSleep(N)把设备处于睡眠模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆