1. Check out our app, Forums for Android! Download and leave feedback here!

testing if activity exists

Discussion in 'Application Development' started by emistral, Jul 14, 2009.

  1. emistral

    emistral New Member
    Thread Starter
    5

    Jul 13, 2009
    3
    0
    5
    Hi all,

    I have currently a menu activity (not the android standard menus but a background image with some buttons) that will start a game.
    The main menu is preceded by a splash screen.
    The splashscreen activity has the singletask mode and once it is complete (loading some resources), it is destroyed.
    if the home key is pressed while playing a game and the app relaunched via the app launcher, the splash screen activity is recreated however this time I will not load the resources since they have been loaded before (I have a test for this).
    What I will do is terminate the activity and go to the main menu activity.
    But instead of calling startactivity I would like to know if there is a way to test if the main menu activity exists and if so move it to the foreground to be active.
    Then in the main menu activity I want to do the same to bring back the game activity - if it exists .
    Help would be much appreciated
     

    Advertisement

Share This Page

Loading...