iphone sleep mode and interaction with apps
To preface this question: I've never actually done iPhone development. Haven't even downloaded the SDK yet. This question arose while开发者_C百科 I was brainstorming about what kind of app might be interesting and feasible for me to create. That said...
I know the iPhone doesn't (yet) support multi-tasking, but I'm curious what happens when it goes into sleep mode. I notice on my wife's iPhone that if I don't "do" anything for a period of time it goes into sleep mode. The screen blanks, etc.
So would it be possible to create an app that did "something" every ~10s without respect to user input? Or would that app stop doing "something" as soon as the phone goes to sleep?
There are ways to keep an app from going to sleep. You can even dim the screen etc. to save battery, while still running the app.
Apple has strict guidelines for when you should do this.
Try reading up on the HIG, it will answer all the questions you have, but yes it is possible.HIG
精彩评论