What does double-tapping on the home button exactly do? - iphone

What does double-tapping on the home button exactly do?
Does it list the applications running in background, OR
Does it list recently used applications?
I've implemented the "Application does not run in background" in my Info.plist file. In spite of this my application shows on double tapping the home button !! Yes I have tried a clean build.

It shows all recently-used apps, not just the multi-tasking ones. If you try to tap your app now, it will start exactly like it was first launched, displaying the launch image first before initializing (calling application:didFinishLaunchingWithOptions: and sending the relevant notifications).

Related

Android Application: Returning to the activity where you stopped

I've been making a simple android app here, but i'm stuck with a problem. The app is composed of 1 splash(that is the main activity) and 4 other activities(one of them is used to go to the other 3). Whenever i exit my application and resume it with the process manager, it opens the activity i stopped at. But, when i resume it by clicking on the icon, it goes back to the splash activity. Is there any way to make it always go to where i stopped? Any flag or something i can set on the manifest?
This is an Android bug. The standard behaviour is to return to your application (in the same state as when you left) when launching it from the HOME screen. However, if you started your application for the first time from the installer, this gets broken.
To check if you are seeing this behaviour, go to the Settings->Applications and force close your application. Now go to the HOME screen and start your application. Use your application for a bit. Now press the HOME button to return to the HOME screen and launch your application again by clicking on the icon. It should return to your application exactly the way you left it.
See https://stackoverflow.com/a/16447508/769265 for more information and other links to this long-standing and nasty Android bug.

Application does not run in background mode

I have set "Application does not run in background mode" property key to YES and when I hit the home button it only puts the application into background mode when I click home button twice the app is still running in background and when I relaunch the app the application will enter foreground method is called . I have a setting bundle that creates tabs for UITabBarcontroller and I want the app to quit as it need to run the setup method to work out which tabs to show . I tried to use application will enter foreground to remove view controllers from the tabbar controller by reading the settings bundle and it works but the application will enter foreground method is no good as I can not re-add the view controllers I removed if the settings are changed back again so my only option is to quit the app and the application did launch with options method alloc and init all view controller b reading the setting bundle first . Is there any other way to quit the app
The fact that your app's icon is listed once you double press the Home button is not indicative that it is running. At best, it indicates which apps the user used last.
"Running in the background" and "loaded into memory, ready to resume" are not the same thing. It's a bit similar to how you can shutdown a computer (it's not processing anything), and if put a computer to 'sleep', it's still not processing… but the state of the computer is kept.
I would invite you to read the suspended and background states : App States and Multitasking.

Can we write the action for Home button in iphone

I am going to develop an application which will be posted in cydia. My requirement is after unlocking the iphone when the user clicks the home button then my application need to be popedup(run) ..
is it possible to do this?
if yes how?
You can do this without any extra code by changing the settings in Activator. The app doesn't need to be in Cydia, either.
Confirm you have Activator installed from Cydia.
Go to the Settings app, followed by Activator.
Choose which environment you want the action to run in: Anywhere, Home Screen, in an app or Lock Screen.
Scroll down to “Home button” and tap the action you want.
Scroll down again, until you see the app you want. Tap it and confirm there is a check mark next to it.
Now your app will start every time the action occurs. If you want this to be automatically set when your app is installed, however, you'll need to include the libactivator header in your code and use its API to set the action. Because the header isn't included with iOS, you'll need to make the app for Cydia.

App running in background despite plist saying not to

In my appname-Info.plist
I have 'Application does not run in background' box checked.(it is ticked)
But when i press the button under the screen to close the app, and then double press the button it shows the list of apps and my app is there among the list of currently running apps. Does this mean that my app is running in the background?
If so is there a fix for this? I'd like to make sure my app is completely dead when user quits it.
Thanks
-Code
Your app is not running in the background after you close it.
Even if you see it in the switcher app list.
Application has different states
Active
InActive
Running in Background
Your application become in-active, not running in background.
Aplications are allaowd to run in the background only for:
Playing music.
Navigation needs.
VOIP (as Skype).
And you should explicitly ask the permission and set the appropriate code for doing that and not only check the 'Application does run in background' in the info.plist
The list you get when you double tap the home button is not a running applications list. That's a common misconception. It's actually a list of recently launched applications. Therefore it makes sense for your app to be in it even if it doesn't multitask.

Forcing an iPhone app to quit when Home button is pressed (on iOS4)

I do not want my app to switch to the "task bar" when the Home button is pressed. That's why I would like it to be closed upon Home press. I added this entry to the info.plist file but this does not change the behaviour:
application does not run in background
(and I checked the box...)
I rebuilt the whole app both in debug and release mode but no way. I heard of another key which should be added to the info.plist but I cannot add it through Xcode:
UIApplicationExitsOnSuspend
What is the right way to do that ?
Regards,
Franz
On iOS 4, multitasking is enabled in Xcode projects by default. This prevents the applicationWillTerminate method from being called. If you do not want to support multitasking, place UIApplicationExitsOnSuspend in your MyAppName-Info.plist file and check the checkbox. If you do want to support it, place any code in the applicationDidEnterBackground delegate method that you want to execute before the application enters an inactive state.
What you're doing will indeed stop the application from running in the background, but you can't prevent it from going to the multitasking bar still. Sorry.
You can manually close the application after home button is pressed. When home button is pressed applicationDidEnterBackground is called. In this delegate just write exit(0) and your application will be ended instantly.