Inside your MyActivity.onCreate method:

Handler timeoutHandler = new Handler()
{
  //@Override
  public void handleMessage( Message msg )
  {
    // after receiving the timeout message, start the next activity
    Intent intent = new Intent( MyActivity.this,
MyOtherActivity.class );
    startActivity( intent );
    // terminate this activity if you don't want to leave it on the
activity stack:
    MyActivity.this.finish();
    super.handleMessage( msg );
  }
};
Message msg = new Message();
timeoutHandler.sendMessageDelayed( msg, 60000 ); // milliseconds

On Nov 29, 9:49 am, charlest <[email protected]> wrote:
> I want to display a message on the screen, have it displayed for 60
> seconds, then display another message. There is nothing specific going
> on during the 60 seconds that I'm waiting to complete, so AsyncTask
> doesn't seem to apply. Does someone have a generic code snippet that
> does this so that I can use it in other places as needed?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to