I need to check periodically if the camera is obscured or not.

I was thinking of doing this by taking pictures periodically and checking them for brightness, if there is any way to let an App take pictures while the App is in background. Apple does this within it's Find my iPhone system, as I've read (taking randomly/secretly photos of the thief). Is there any way of achieving this within an own App?

Or do you have any other idea how to achieve this?

有帮助吗?

解决方案

Not in any way while your app is in the background. Here's a list of services allowed while the app is in the background.

You can only, sort of, check the luminosity while your app is active by calculating it from the images you take. Apple does not allow access to the light sensor to apps yet.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top