简体   繁体   中英

Can a multitasking app receive a notification when the device unlocks the screen even if the app is in the background?

My app needs to perform a calculation every time the device unlocks. It's an app which the user launches intentionally and then enters background, similar like a pasteboard manager.

How can it receive a notification when the device unlocks while the app is in the background? Is this possible? The calculation is not heavy. It just reads and writes a value from/to NSUserDefaults.

使用当前的SDK和公共API,即使您的应用程序在后台,也无法判断用户何时解锁屏幕...

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