views:

314

answers:

1

Hi, I want to build an alarm application for iphone. I want to ignore iphone device state and volume buttons state. I want to play sound anyhow in full volume and also want that user cant modify volume using iphone hardware buttons while sound is played. Does anybody know how to implement it? Please post the code here.......

Thankx in Advance.......

+4  A: 

This is not possible (without jailbreaking).

You cannot force the iPhone to change its volume or intercept the hardware buttons. Also you cannot "ignore device state", as you cannot run background apps. So if your app is not running you can't execute any code

pheelicks
+1 You can never do anything in code that will override the hardware settings and/or which might interfere with phone functions. Anything that does so is a non-starter.
TechZen