简体   繁体   中英

How to detect if UILocalnotification sound is playing or not

In my application I am using 'UILocalNotification` with a 30 sec audio file. I fire the notification when device is in lock mode. I tried to drag the notification on lock screen, then application will open at that Notification sound is playing, I need to recognize notification sound is playing or not when app is in foreground.

No good way, but you can use NSTimer. Start timer after show notification and make work when timer notify you. It will work, but use it only if any other resolution don't work.

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