Play splash movie every time app launch (with multi-task support) - iphone

the app I'm working on supports iOS multi-task feature by default, and I want to stick with this.
Upon app launch, a splash movie clip is played (code is in AppDelegate), after user hits the home button, and re-launches the app, I want to the same splash movie be played before showing the last view where use was.
I know by switching off the multi-task support, I can achieve this, but in the meanwhile, I'm losing the multi-task support feature, and I need to write code to save/resume user states. So, is there any workaround for this? thanks!

You could try the app delegate's applicationDidBecomeActive: method but quite frankly I'd consider this to be user hostile behaviour. Who wants to see a movie every time they switch between apps? The point of multitasking on the iPhone is to quickly change between apps and this violates that.

Related

How does GuitarToolkit show a persistent active banner when in background?

I have GuitarToolkit on my iPhone4S (iOS 5.01 - NOT jailbroken) It has a metronome feature which continues playing in the background, and also adds a red banner overlay (see screenshots) which persists on the home/lock screen and also when other apps are running. The banner is animating (background colour pulses) and it is also 'active' in that pressing it will return you to the GuitarToolkit app.
I know about the background audio APIs for the sound, but how does it do this banner? My first thought was local notifications, but nothing appears in notification center, and GuitarToolkit is not listed under Notifications in Settings.
My iPhone is not jailbroken and GuitarToolkit is available in the App Store, so what APIs is it using to achieve this?
Having an active AVAudioQueue creates that banner.
The banner appears because it’s got an open audio recording session—you’ll notice that the system Voice Memos app does the same thing, as does Shazam for a moment before it enters the background and Skype when you’re on a call with the app in the background. I’m not sure of the specific API, but that’s generally what’s going on.

Is it possible to pause my flash app on iphone by pressing home button?

I'm quite new to Flash. So here's my problem: I've created my app and it works great. But when I press home button on my iphone, my app minimizes and when I open it from multitasking apps, it simply restarts. Is it possible to freeze or pause the game instead of stop? Thanks!
By default the application should be eligible for the 'freeze-drying' iOS4+ functionality that resumes an app from the last place it left off. That may require a setting to be adjusted in your app descriptor (UIApplicationExitsOnSuspend should be false).
If you simply need to save data when the application is quitting, you can listen for Event.EXITING on the NativeApplication:
NativeApplication.nativeApplication.addEventListener(Event.EXITING, onExit);

How to relaunch an Air-based iOS application from the very first page?

My application is an Air-based iPhone app. It opens with the last page I visited before clicking the Home button, each time I relaunch the app, while I need to open with the splash screen onward. How can I resolve this issue?
Thank you for any help.
When you press the Home button, you don't terminate a running app. I'm sure that many of us developers have stuck with this mental model of how iOS used to work without multitasking.
So, the splash screen, or rather, the default image (Default.png) should really appear once (when your application launches). Some times, the default image appears when coming out from the background state, but this happens only if your app takes too long to show its UI. In fact, on fast iPhones, the default image disappears almost instantly even on launch (for well-written apps, that is).
I should also note that Apple actively discourages the use of the default image for splash screens. These should only be used for creating an illusion of transition, from a "launching state" (which the default image is supposed to portray), to the running state.
However, if you really have to show a splash screen every time, you should implement such a mechanism in code. applicationDidBecomeActive: is a good place to start, if you are writing code in Objective-C.
I don't know the event model in Air, so I can't really give you any hints for that.
The above answer, though old, does not answer the question. Sure, Apple gives guidelines regarding splash screen and all, but the poster asks how to prevent the app from resuming from it's previous position. If you want the app to terminate when put in the background you need to look into the UIApplicationExitsOnSuspend option. There's also an Adobe blog post explaining a bit more about different background behaviors.

Using a splash screen instead of a loading screen - a violation of Apple's HIG?

I have a splash image that I want to display when the app is launching. I use it as a launch image - I want it to be displayed until the program is launched (rename the picture to Default.png).
In apple's HIG they say one should "avoid" using a splash screen as a launch image.
I know it's not recommended and that users often don't like them, but will it make Apple reject my application? If so, how can I display a splash screen so it'll be displayed as soon as the app goes on, but not violate those rules? because I have seen applications with splash screens as launch images.
Thx in advance!
It's not that Apple will reject your App just coz you have a splash screen. But it's advisable to not have a splash screen as the user has to wait. Better not make the user wait...
Flipboard which was the Apple App of the year in 2010 has an image splash screen. As the user enjoys the images, data is downloaded in the background so that as soon as the user flips the page, the next screen is all ready & up to date. But they have made it in such a tasty fashion that the user hardly feels as if he's been made to wait. So it all depends on your design...
If you plan to simply use the Default.png mechanics to display your splash image, there is no problem.
The issue arises when you would like to prolong the display of such image only for the sake of it. This is what the HIG are against: that the user is made to wait without any real benefit. It is also to be noticed that with the advent of multitasking (iOS 4), the effect of showing a splash screen is reduced, since most of the times the app is not closed, so you see no splash screen at all when you go back to it.
On the other hand, it is understood that if you need to do some setup task in your app that take time and you have to do that at startup, then the user will have to wait. It is important, though, that he/she be notified of the wait and why it is for. This could mean, e.g., displaying a label on top of your image saying: "Loading..." or "Preparing data..." or whatever your user might better understand as part of the functionality of the program.
As to how to do it, there is no other way, AFAIK, than starting your app with a view that is exactly the same as Default.png (a simple UIImageView would do). That means, that in you appDidFinishLaunching delegate method, you create the view and attach it to the window; then, when you have done with your app preparation, you switch to your real view.
This would give you also the chance to add the label or whatever other kind of messaging to the user.

Animated Wallpaper Development for iPhones

I an interested in making animated wallpaper apps for the iPhone. This means that, once I click the app to open, it should not open up a view, and it should change the current wallpaper of the iPhone to the an animated wallpaper(which I have designed), while the App is running.
If I close the app, it should bring the iPhone back to the initial wallpaper.
How do I go about this ?
How can I modify changes to the wallpaper of the iPhone with my app.
How can I place my customized wallpaper in a way that the iPhone operates normally and you can scroll to other apps and stuff while the background wallpaper is animated ?
What tools are needed for that animation ?
If I understand you correctly, you want to create an application that swaps out the background wallpaper.
This can only be a jail broken app.
We do not have access to the springboard wallpaper on a normal device with the SDK. So this type of app can only be a jail broken app an a jail broken device and in a jail broken marketplace.
The methods you should implement are pretty simple. Would probably be an NSTimer that chooses randomly from an array of image names and sets the background wallpaper.
I do not know the immediate functions to use, and they are probably undocumented.
Background process app that is always running (like Mail).
In the function the timer calls, just make a UIView animation block that shifts the previous image where ever you want and shifts the new one into the view.
What I would suggest is get the functionality you want running in a project. Once that is all done, look into making it a jail broken app and running in the background (this is probably going to be the bulk of the work, and really really hard)
Currently you can not change a users wallpaper programatically, file a feature request with apple like many of us have :)...However you can do it on jailbroken phones...