Is there any way to turn off screen and adjust volume on the iPad programmatically? It can be private api as this is for personal use. I know that in iPhone you can use proximity sensor but I don't suppose this method would work on iPad.
Asked
Active
Viewed 2,103 times
1 Answers
2
You can use proximityMonitoringEnabled
and proximityState
to handle screen. Look at comment in this answer.
And there is no way to adjust volume
From developer.apple
Global system volume, including your application's volume, is handled by iPhone OS and is not accessible by applications.
-
Will proximity sensor work on iPad Hugh since it doesn't use it? And in regards to volume there must be an api for Apple to use even if private. I don't think apple would hand code that each time they need it rather than just create api and make it private – Flatlyn Jul 14 '12 at 20:49
-
Did you try it? I tried to enable monitor and set proximityState, but it doesn't work (at least on iOS 6) – Victor Ronin Oct 16 '12 at 17:44