Click here to Skip to main content
11,706,639 members (36,895 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: Java Android Eclipse
I am new with java and if somebody can help me with this i really appreciate. My question is how or when can i insert a code to call or launch another activity after the timer lapsed.

protected static final Thread This = null;
protected void onCreate(Bundle hard) {
    // TODO Auto-generated method stub
    Thread timer = new Thread(){
        public void run(){
            }catch(InterruptedException e){
                Intent openStartingPoint = new Intent("--.---.---.------.MainActivity");
Posted 9-Mar-13 22:07pm
ghincelino at 13-Mar-13 0:20am
try to debug.. to see the problem..
agnesn88 at 13-Mar-13 2:00am
is that for android???
Ed Gepulle at 14-Mar-13 8:23am
yes its for android. i am using eclipse. I having difficulties in inserting code to load or call another activity.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

it seems you are making splash screen ,
use handler for this and timer is not use for this puropse , if still want to use timer then ,

make sure you use something which makes timing , thred can never use for time ,

Another option is AlarmManager in which you can do like after 10 sec , you can pass another activiy...

check this links


you can also googling more ...

and lastly you can use this thread in asynch and pass intent in postExecuteMethod...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 202
1 Sergey Alexandrovich Kryukov 135
2 chainerlt 110
3 Mika Wendelius 80
4 ppolymorphe 71
0 OriginalGriff 9,190
1 Sergey Alexandrovich Kryukov 8,407
2 CPallini 5,189
3 Maciej Los 4,756
4 Mika Wendelius 3,686

Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 17 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100