开发者

how to keep getting "accelerometer:didAccelerate:" when app in background

开发者 https://www.devze.com 2023-03-04 04:17 出处:网络
How can my app keep getting a call to its \"accelerometer:didAccelerate:\" method of UIAccelerometerDelegate IF another app interrupts my app, such as the iPhone user receiving a phone call?

How can my app keep getting a call to its "accelerometer:didAccelerate:" method of UIAccelerometerDelegate IF another app interrupts my app, such as the iPhone user receiving a phone call?

My app measures motion, but stops if suspended by the user, or if interrupted by another app.

I know this has been difficu开发者_开发百科lt in the past, but maybe there is something new in iOS.

Thanks!


You can't, apple standards are to block the app when a proccess pops in, It freezes the app at the moment it was interrupted. If finishes the last proccess it started in the background then it freezes the app. If you find a way around it i'd love to know it. Here is something that might help you to find the solution stackoverflow post similar to your question

0

精彩评论

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