Close all running apps on single UIButton touch? - iphone

I wana close all the application runing in the background by single button click. Is this possible? I read all the related post.They all describe about the single application but i want to close all the running apps.I know that apple doesn't allow this.But Is there any private api for this? Please help me.Help would be appricieted. Thank you very much.

I don't think So we can do anything like this as You want to do that from some app which is having its own Address Space i.e. sandBox. Means Every App is having its own Address Space which Other App Cannot Access it, as it will result in Crash.
So, sorry to say but we Cannot up to my Knowledge... :)

I don't think it is possible but Even if you do something like this your app is for sure be rejected from uploading on app store, this will be a virus for iphone,

There is no need to stop all running apps by any means, and there is no way to do this programmatically other than jail breaking your device and hacking something together.
But in the end it makes no sense at all, see: http://speirs.org/blog/2012/1/2/misconceptions-about-ios-multitasking.html

Related

make the program automatically go to background

I want to click on a button to make my program into the background. How would I do this?
If it used to jailbreak the phone,
If you mean programmatically "minimize" the app (closing it while leaving it open in multitasking), I don't believe there's a way to do so using a public API.
Please have a look at the following anwsers
Send App to Background process
Suspend the application
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. Depending on how severe the application malfunction is, you have two choices.

passworded exit from the app

I am developing an iPhone app, that will not be distributed on AppStores. I have tried to search for private api but no luck. When the user tries to quit the app, I want to prompt the user to enter the correct password so as to enable him to exit the app. How can I achieve this? Thanks in advance.
Cheers!!
It sounds like you need something similar to iOS "Kiosk Mode" as described in this answer:
Put an iPhone or iPad into 'Store Demo' mode
Using that description in conjunction with the following steps might achieve precisely what you want:
Have a "Quit" button
Show a password dialogue when it is pressed
If it was correct, read an out of bounds array location (or do whatever) to crash the app
With that config installed you'd get stuck in whatever app you launch next, though.
You can't! You'll have to password protect the launch instead.
If you want to prevent the user from quitting your app, you'll need to physically cover the home button. This isn't a bad solution if your goal is to do something like a kiosk or a point of sale system, where you probably want to mount an iPad in a secure enclosure to prevent tampering or theft anyway. There are quite a few such enclosures on the market in a variety of styles.
For a normal app, though, there's really no solution -- iOS isn't designed for whatever you're trying to do.
The only way I could think to do what you want (which is to prevent access to certain apps) would be to replace the SpringBoard application (this is the method used by Apple itself in the App store models of the iPhone and iPad that restrict the things you can do on the devices). #owenfi pointed at one way to do that without jailbreaking, but in general it is limited: you won't be able to "exit" the app, you will basically just be able to run a single app.

Is it possible for an app to run in the background and collect data?

I want to make an app that runs in the background so that if a user is reading a web page or PDF file on an iPhone or iPad, he can mark some words, see the meaning of those words, and then have those words stored in the app's database. He can then afterwards look for the words which he has learnt and increase his vocabulary.
Does the iOS 4 API allow that? What are the limitations? Advantages? Disadvantages?
Thanks in advance
No is does not, you can only run voip. audio or navigation apps in the background.
Only one app can run at a time, and installing one app cannot effect any built in app. So no, there is no way to achieve what you are trying for here.
Your best bet is to instruct users to copy the word, open the app, and then you can snag whatever is on the clipboard then.
(Note there are multitasking APIs, but you still cant access anything outside of your app even if you convince the OS to let you run in the background for a little while)

forbid exit from iphone/ipad application

is it possible and how to implement forbiden exit from application on iphone/ipad?
we have an application that must permanently work on ipad device. user should not have any way to exit from application. could you advise how to implement this functionality?
By jailbreaking it and installing custom software that enables you to do that.
Or putting a lot of tape over all the buttons.
Anyways, you can't do this with a standard app on a standard device. Just think about it - would be a pretty annoying thing for apps to do, wouldn't it?
Apple's own human interface design guidelines would forbid this. Your app can't encroach on the abilities of the OS that transcend your own application's responsibilities. The whole point is to have a consistent experience for the device and if you're modifying something as fundamental as switching apps, you're violating that principle.
If you can't exit the app, you're essentially turning your device into a single purpose unit. How do you expect to get back to the app list if you disable fast app switching and the home button?
Whatever solution you find would not be approved by the app store.
You should look at whether the current multitasking features can help chip away at your reasoning for needing the app to always run in the foreground.
If you are talking about an enterprise app locally distributed, you might be able to do this, though probably not.
The best idea would be to physically break or block the hardware button.
Or issue alerts to the device every 10 seconds making the thing effectively unusable when outside the application (you can ignore incoming notifications for you in-app).
Why do you have this requirement?
There is no way to implement this functionality. You cannot do it.
You can't do it, But if you jailbreak and configure the "Home-Button" settings you can :)
Btw, If you do it, the only way to quit will be a shutdown... And to shut down every time would be kinda annoying...

How do I kill a back ground running app in iphone?

I just want to know how to kill a back ground process/app in iphone. Just like in Auto Lock SBSettings where, the "process" toggle is able to list all the back ground process and allows user to kill any of them.
Thanks in advance.
Thanks 'refulgentis', 'Chuck' for your quick responses.
You're true and also I know that the Apple's public API doesn't allow me to do so. In a jail broken phone how could I do this? How "SBSettings" 'processes' toggle is doing the same?
My requirement is to kill and restart my "Phone (MobilePhone.app)" application. In this case how can I proceed further?
Can you please give me some sample piece of code?
You can't, using the public API. Anything you write wouldn't be allowed on the App Store.
For jailbroken apps, just use ps -ax and kill.
Since you aren't allowed to have any background apps running on the iPhone, this turns out to be something of a non-issue.