I am looking to make an app to replace the standby button. The problem, I've looked over the iPhone API very thoroughly and found how to disable standby but not how to cause the iPhone to go into standby. I'm sure there must be a way, after all the iPhone goes into standby after a time anyway. Thanks in advance for any help.
I don't think so. Allowing an app to cause standby could easily be abused, as waking from standby would put you right back in the app, upon which it could force a standby again. Apple tends to not allow behaviours that can be abused like this.
I'm sure there's a way [edit: for Apple to do it], but what I am not sure is that Apple made it available through the API.
More info here
There may not be one there are obvious reasons for an app being able to disable standby i.e. video playback, turn based games...
However if you could put an app into standby whats to stop you detecting it coming out of standby and putting it back in thus making you have to do a reset or something to get out. I can't think of a reason for needing to put the iPhone in standby other than an annoyance/virus.
Thank you all for helping. With my iPhone in one hand I can't press the top button so I wanted to build an app to put the iPhone into standby instead. Guess i'll just have to do without, Thanks Again.