1

Possible Duplicate:
Force app to close and run in background

I'm creating an radio application in ios. There is a minimize button in my application. So what I want to do is when user press that button the application should be run in the background and the app icon should be displayed in the notification area like normal Android radio app. I want to know is it possible in iOS and how can I do that. Any one can show me an example.

Thanks

Community
  • 1
  • 1
iDia
  • 1,397
  • 8
  • 25
  • 44

1 Answers1

3

The only way to make ones application goes to background programatically is to open another app (Safari) calling its URL. But I don't think that is what you have in mind (since you are saying you have a radio app).

So if you want to imitate the same action which happens when user pressing home button, it is not possible with iOS SDK. From iOS human interface guildelines

Don’t Quit Programmatically

Never quit an iOS application programmatically because people tend to interpret this as a crash. However, if external circumstances prevent your application from functioning as intended, you need to tell your users about the situation and explain what they can do about it.

Apple also says in the documentation

People, not applications, should initiate and control actions. Although an application can suggest a course of action or warn about dangerous consequences, it’s usually a mistake for the app to take decision-making away from the user. The best apps find the correct balance between giving people the capabilities they need while helping them avoid dangerous outcomes.

So I don't think it is possible using public API.

Krishnabhadra
  • 34,169
  • 30
  • 118
  • 167
  • thanks for ur reply. It seems like the only solution is removing the minimize button ? :) – iDia Jan 18 '13 at 03:28
  • Yes @saji723, that is the wisest option. Apple is very strict about it, and no way your app pass the validation with a minimize button. – Krishnabhadra Jan 18 '13 at 03:29
  • If there was a URL scheme to open the Springboard app (home screen) it would be possible to emulate pressing the home button I guess (can’t be sure it would look exactly like that). – Nicolas Miari Jul 19 '18 at 22:27