Go to the home screen.

by ipeg . student » Wed, 25 Feb 2009 13:24:31 GMT


Sponsored Links
 Hi All Android Developers.......


                           Thanks for the replaies. I want to go to
the home page of android from my activity. Can anybody tell me how can
i do this? I have tried a lot. Thanks in advance.

--~--~---------~--~----~------------~-------~--~----~



Go to the home screen.

by Romain Guy » Wed, 25 Feb 2009 13:25:44 GMT


 Just press back :)






-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Go to the home screen.

by Romain Guy » Wed, 25 Feb 2009 13:25:49 GMT


 Or better yet, press the Home key :)







-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~



Go to the home screen.

by ipeg . student » Wed, 25 Feb 2009 13:37:20 GMT


 Hello

                   Thanks for the reply. But my question is i have a
exit button. I want to go to the home screen by clicking the button. I
know the onClick() method. Please tell me the method by which i can go
to the home page of android.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        btn4=(Button)findViewById(R.id.bt4);
        btn4.setOnClickListener(new ImageButton.OnClickListener() {
                public void onClick(View v) {




                ????????







                }
                });


i dont want finish() method.

Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~



Go to the home screen.

by suhas gavas » Wed, 25 Feb 2009 13:39:24 GMT


 hi
onclick just write System.exit(1); and it will do the rest for u

reagrds,
Suhas





--~--~---------~--~----~------------~-------~--~----~



Go to the home screen.

by Zack » Fri, 27 Feb 2009 01:46:20 GMT


 Hi,

I'm trying to do something similar. My app has 3 activities

EULA (checks preference for accepted, so must of the time is not seen)
->
Loading Data ->
Main Activity

If I get to the Main Activity and hit the back button, it goes back to
the loading screen. Now, I'm catching onKeyDown, looking for the back
button code and if I find it would like to use startActivity to launch
the Home Screen. System.exit(1) performs the same thing as the back
button.

Anyone know what class / package I can use in an Intent to launch the
home screen?





--~--~---------~--~----~------------~-------~--~----~



Go to the home screen.

by Zack » Fri, 27 Feb 2009 01:46:31 GMT


 Hi,

I'm trying to do something similar. I have a few activities in my app.
When the app starts it goes from

EULA -> Loading Screen -> Main Activity

If I get to the Main Activity and hit the back button it will go back
to the Loading Screen (which I understand) but now I'm trapping the
onKeyDown for the back button in my Main Activity and would like to
get to the home screen through startActivity()

System.exit(1) as suggested below seems to just restart my Main
Activity. Any suggestions? Thanks!






--~--~---------~--~----~------------~-------~--~----~



Go to the home screen.

by Marco Nelissen » Fri, 27 Feb 2009 02:50:36 GMT


 


You can just have your loading screen and EULA activities call
finish() on themselves when they are done. That way your 'main'
activity becomes the first activity in the chain, and exiting it will
exit your app.

--~--~---------~--~----~------------~-------~--~----~



Go to the home screen.

by Dianne Hackborn » Fri, 27 Feb 2009 11:41:45 GMT


 And for heaven's sake don't call System.exit()!







-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~



Go to the home screen.

by IPEG Student » Fri, 27 Feb 2009 12:23:19 GMT


 






Intent i = *new* Intent();

i.setAction("android.intent.action.MAIN");

i.addCategory("android.intent.category.HOME");

startActivity(i);
I think it can solve your problem.

--~--~---------~--~----~------------~-------~--~----~



Go to the home screen.

by deepdr...@googlemail.com » Fri, 27 Feb 2009 16:27:39 GMT


 you should just remove it from the Java implementation :-)






--~--~---------~--~----~------------~-------~--~----~



Go to the home screen.

by Zack » Fri, 27 Feb 2009 21:06:58 GMT


 Well, that was simple :) Thanks all. I knew System.exit() was what I
was looking for.

On Feb 27, 3:27am, "deepdr...@googlemail.com"





--~--~---------~--~----~------------~-------~--~----~



Go to the home screen.

by Zack » Fri, 27 Feb 2009 21:07:27 GMT


 Was NOT what I was looking for!







--~--~---------~--~----~------------~-------~--~----~



Go to the home screen.

by Al Sutton » Fri, 27 Feb 2009 21:39:00 GMT


  http://groups.google.com/group/android-developers/browse_thread/thread/fbd891ee591f738d 

Al.
 http://andappstore.com/ 











-- 

* Written an Android App? - List it at  http://andappstore.com/  *

======
Funky Android Limited is registered in England & Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Member baru

Hi all,

Perkenalkan, member baru Di group ini. :)
Nama : Ryandi
Handset : android dev phone rev 1
Lokasi : bgr-jkt pp :P
Salam kenal buat suhu2 dimilis android Indonesia.

Salam,
Ryandi

*** Powered by Android Dream ***

--~--~---------~--~----~------------~-------~--~----~
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group, please visit the following page:
 

2. Dildroid

gimana cara-nya tuh, bentuk-nya aja kan beda




aplikasi buat "o0o yes o0o no" :p
Iseng2 pas bangun tidur siang.. Di Google Market ada program yg bisa merubah Android jadi... hihihihi : {*filter*}!! Ada-ada wae nih yg bikin program.. Send by Quietly Brilliant.. Google HTC Nexus One
-- Jus* ~ send using pc jangkrik krik krik ~ -- "Indonesian Android Community [id-android]" Join: http://www.***.com/ Moderator: id.andr...@gmail.com Unsubscribe: id-android+unsubscr...@googlegroups.com id android Developer: http://www.***.com/ id android on FB: http://www.***.com/

3. Activity lifecycle problem on Nexus One - onStop not called

4. Jeruk Forum New Tutoria

5. Update3: Kloteran External Battery 4400mAh - Just Mobile Gum Pro & Gum Plu

6. Weird bug in Canvas + TextView

7. Instrumentation testing