Skip to main content
Participating Frequently
October 27, 2010
Answered

Android Splash Page

  • October 27, 2010
  • 1 reply
  • 2042 views

Hey there-  So I set an image on frame 1 and set a timer, after 3 seconds the timeline advances to frame 2.  While this works the first time the app is loaded, on subsequent loads it seems the timeline is already set to frame 2 and skips frame 1.  How do I clear the cache and start the app over if I exit out of it?  Thanks any advice is appreciated!

This topic has been closed for replies.
Correct answer Joe ... Ward

On Android, your app doesn't exit when the user presses the back or home buttons. It remains "dormant" in the background. The OS will kill it eventually. You use deactivate events to detect when your app oes to the background and activate events to detect when it is reactivated.  So,you could go back to frame 1 in the event handler for the activate event.

On the other hand, you might consider that users won't expect your app to completely restart every time they switch tasks. It is a good idea to save the appliction state when you get a deactivaye event and restore it when you get the activate event.

1 reply

Joe ... WardCorrect answer
Participating Frequently
October 27, 2010

On Android, your app doesn't exit when the user presses the back or home buttons. It remains "dormant" in the background. The OS will kill it eventually. You use deactivate events to detect when your app oes to the background and activate events to detect when it is reactivated.  So,you could go back to frame 1 in the event handler for the activate event.

On the other hand, you might consider that users won't expect your app to completely restart every time they switch tasks. It is a good idea to save the appliction state when you get a deactivaye event and restore it when you get the activate event.

work-edAuthor
Participating Frequently
November 5, 2010

Just a quick follow up...  Seems Air for Android won't trigger an ACTIVATE event when the app is opened for the first time.  Is there something else I can listen for? Is this a bug you think?

Participating Frequently
November 5, 2010

You can listen for the invoke event from the NativeApplication object. Invoke is guaranteed to be dispatched at start-up.