Prevent screen shot after closing the application - iphone

I have a problem that recognized recently but could not find the solution.Generally when we run an application in simulator we get the following folders:documents,library,tmp,etc.Now if I close the application suddenly in simulator then in library folder we can find caches folder and in that snapshot folder.In this folder we get one folder with bundle identifier name and in that we get screen shot of the application where we closed it.Now my requirement is to stop those screen shots when I close application

You need to hide your view in
- (void)applicationDidEnterBackground:(UIApplication *)application
This is standard behaviour, as it gives the impression that the app resumes quicker if it appears to go back to where it left off - even if technically the app is not quire responsive yet. All you need to do is put something else on the screen in the above method and this will now become the first thing that comes to the front when a user opens your app back up

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.

Resetting iPhone Application

I have an application that is currently named "xxxx". The app runs and works perfectly without any problems. However, I have reached a stumbling point. When I try to load the application onto my iPhone, the pictures on my picker view seemed to have disappeared for some strange reason. I've done multiple hours of debugging and everything checks out normal. I then decided I wanted to change the product name from "xxxx" to "xxxx Redo". As soon as I did that, the application loaded perfectly normal (with the pictures in the Picker View as it should be).
In conclusion, it comes to find out that there is no actual bug in the programming aspect of it. However, my question comes up as to why does it not load the correct way with the original product name but then loads the right way when the product name is changed?
The second part of my question is if anyone knows of a way to fix the original application so that way it displays correctly again with the original name?
I have tried the following:
Cleaning the app
Trashing the .app file and rebuilding
Deleting the app on the iPhone and rebuilding.
These things sometimes just happen, you can try the following extra steps:
clean build folder in XCode (press alt while clicking Product menu)
reboot the phone (poweroff/poweron)
I have seen cases where it made a difference.

iPhone: Stopping a Program from Running in the Background

Right now, I have an application with a single map view. What should I do to stop the app from retrieving new location updates once I hit the home button. My goal is to make that arrow next to the battery symbol disappear when on the main menu page. The app will launch again when the user brings it back to the foreground. This is what I have so far, but it's not working.
- (void)applicationDidEnterBackground:(UIApplication *)application
{
exit(0);
}
What you have should work (in fact, I have used it once for debugging purposes).
However, you should not do that, despite the fact that it works. Simply set the UIApplicationExitsOnSuspend key in the Info.plist file of your application to true.

ios app dosnt work when testing on a test device

When I build the application to the testing phone everything works fine. If i then press the home button go back to the main screen then run the app , again everything works fine.
However if I quit the app to the home screen then close the application from running in the background and then try to run the app again from the main icon, it wont run it just goes to black screen and stops the phone from working or itll load the main view and none of the buttons work.. the only way to fix the phone so its usable again is to lock it and turn the device on again..
has anyone suffered this same issue before?
Sometimes the bootstrap server seems to get confused when you hit the home button and return to the app. If you are testing multi-tasking/background behavior, try the following process:
Build and run from Xcode.
Disconnect your device (your app will quit).
Now, truly quit the app by double tapping the home button and holding down on the app icon.
Finally, reopen the app and test for multi-tasking/backgrounding behavior (your won't get console messages however).

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

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).