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 );
Thread.sleep ( 1000 ) will make the app pause for AT LEAST 1 sec. Not
exactly 1 sec. Thread is not guaranteed.
Ivo
On Mon, Nov 29, 2010 at 5:55 PM, dipti dvai...@gmail.com wrote:
You can use java's Thread.sleep(1000) . This will make the application
pause for 1 sec ( 1000 millisec )
On Nov
On Nov 30, 7:50 am, Emanuel Moecklin 1gravity...@gmail.com wrote:
I would recommend using something like:
This was actually unnecessarily complex. There's no need to post a
whole new runnable to a handler that, in turn, sends a message to the
same handler. You can just send the delayed message
You are right:
private static final int WAKE_UP_DELAY = 5000;
private static final int WAKE_UP_CALL = 0;
private Handler handler;
handler = new Handler(new Handler.Callback() {
@Override
public boolean handleMessage(Message msg) {
The Thread.sleep(1000) is probably not the best idea on Android
because responsiveness is an issue if you care about user ratings ;-).
With Thread.sleep() the app just sit's there and waits and won't
respond to user input.
I would recommend using something like:
private static final int
Whatever the case is, you cannor prevent the user to press the Home
key to display the Homescreen, right? If you don't care about the Home
button, then I guess, an Activity or a dialog should be fine.
On Nov 30, 8:50 pm, Emanuel Moecklin 1gravity...@gmail.com wrote:
The Thread.sleep(1000) is
You can use java's Thread.sleep(1000) . This will make the application
pause for 1 sec ( 1000 millisec )
On Nov 29, 6:49 am, charlest stevegut...@gmail.com wrote:
I want to display a message on the screen, have it displayed for 60
seconds, then display another message. There is nothing specific
7 matches
Mail list logo