简体   繁体   中英

Android Lock the screen in AppWidgetProvider out of an Activity

How to create a simple widget that locks the screen without an Activity , only in an AppWidgetProvider ?

I've tried this solution but the method getSystemService does not exist out of an Activity context.

Thank you very much for every clarifications.

在传递给onReceive()Context上调用getSystemService() onReceive()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM