Is it possible for my app to hide the "back to" button that iOS inserts in the top of the screen?
Other than grabbing the name of your app, no there isn't a way to take over that button.
Its created by the system anytime one app opens another. It grabs just the bundle display name from the sending app. Tapping on it is outside of your application.
You can listen for didResignActive and other AppDelegate callbacks to adjust your app probably. But changing its behavior or keying on it specifically isn't possible.
Related
In the iOS, when the user double home button , the app show in the list at background.
Have possible hidden my app show in the list, or force the user swiped the app, the app in the background can't close?
I just known applicationDidEnterBackground can do something in the background. But
I wish force the user can't swipe the app in the list or hidden the app in the list, or have some mobile device management method can do this effect(we can use private api)?
I search many time , but I was not found some answer...
thank you very much.
This is not possible in iOS, the user is in control and Apple does not allow your app to hide it self in this list.
If you want this you will need to target jailbroke devices and hook on the task switch. Then detect you app from being closed and restarted it.
I want to do some action in my app when the user presses the power button two times while my app is already in background/closed. How can I trigger the action of power button for it inside my app? or if I can add any observer in my app for such action? Is it possible to get this functionality in iOS?
Thanks for help
It is not possible to observe exactly on touching any button on the device. It is the same with volume buttons, you can observe the effect (volume went up or down) but not the pushing button in fact (the volume changed could be triggered in other way).
Sum up:
This is not possible, do not go for it.
I need a way for my app to know if the home button is pressed, while the app is running in the background. If the home button is pressed, something is gonna be added to a list inside the app. Is that possible somehow?
If your app is in the background, your app wont receive any updates. Furthermore, there isn't any way to hook into the home button click even if your app is in the foreground.
Perhaps there is a private api way to handle this, but your app certainly won't be able to both achieve this goal and be in the Apple App Store. Sorry!
In case you wanted some idea why Apple doesn't allow this, it's because they don't want the home button switch's default behavior to be altered. See this:
10.5 Apps that alter the functions of standard switches, such as the Volume Up/Down and Ring/Silent switches, will be rejected
In IOS, when we double tap the home button, it lift's the current app and shows all the app that are running on the bottom. I can scroll the bottom and select the music player option from there. I want to achieve the same screen lift effect, when user taps a button from withing the app instead of double tapping the home button. Is it possible to that? If yes, how can we do it?
No the home button function (unless jailbroken) cannot be re-created inside your UI.
Also since iOS6 users can opt to have Guided Access enabled, if that button where to be created would be considered useless. Now that would be a pain to do in a de-bugging process.
You would have to access the Home Button API (if there was one) as well as the guided access API.
My iOS 4/5/6 app is meant to be used briefly. I want the user to click a "Done, now go away" button which takes them back to the app they were using before mine came to the front.
Is there a way for my iOS to put itself in the background while returning the previous app to the front?
On an iPad, the user can get that effect by doing a four-finger swipe horizontally across the screen. But that gesture is not a complete solution because (a) that gesture does not work on a handheld device, and (2) not many users know of that gesture. I want to programmatically return the previous app to the front.
I want the user to click a "Done, now go away" button
That button is the Home button.
I want to programmatically return the previous app to the front.
There's no public API for switching to another app. Users have a number of options for switching between apps, though. In addition to the swipe gesture you mentioned, they can do a four-finger upward swipe to get to the list of recent apps, or double-tap the home button for the same effect, or hit the home button once to go back to Springboard. Users, not apps, are supposed to be in control of which app is in the foreground. And the way they do that should be standard from one app to another. I can understand wanting to make life easier for the user, but what you're trying to do just isn't possible with the available API.
I Don't think you can do that if the previous application is not your property or if you are not aware if a URL Scheme has been incorporated in the previous application that you know of.
Launch App Via URL Scheme!