开发者

android wifi permission

开发者 https://www.devze.com 2023-01-04 11:07 出处:网络
I don\'t understand why i need to add WAKE_LOCK permission to the applicat开发者_StackOverflow社区ion manifest when I toggle wifi with setWifiEnabled...

I don't understand why i need to add WAKE_LOCK permission to the applicat开发者_StackOverflow社区ion manifest when I toggle wifi with setWifiEnabled... Any idea ?


Just a guess, but I'd imagine it's because wifi is pretty power hungry, and wake locks are Android's mechanism to help the system manage when apps are using power. From http://pdk.android.com/online-pdk/guide/power_management.html:

A locked wakelock, depending on its type, prevents the system from entering suspend or other low-power states.

0

精彩评论

暂无评论...
验证码 换一张
取 消