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. Small screen devices cannot see my app even declared already in the manifest

Ok...thanks for this..I also found out that I really don't need the permission 
of the CAMERA because I used an Intent to launch another application that uses 
the camera..but this one is already a good help in case I will be directly 
accessing the device camera.

Thanks,
-Brian




From: Lance Nanek <lna...@gmail.com>
Subject: [android-developers] Re: Small screen devices cannot see my app even  
declared already in the manifest
To: "Android Developers" <android-developers@googlegroups.com>
Date: Tuesday, March 9, 2010, 11:58 AM

Are you using the camera permission? If so you need to indicate that
you don't need autofocus as per this page:
http://developer.android.com/guide/topics/manifest/uses-feature-element.html




-- 

2. Multi-device control with ADB

Dear sir,

I want to control several devices with adb command "adb -s <serial
number>"

but the serial number of my devices are all the same, so the command
can't work.

And I think I shoud modify the adb both the host and the client side.

Would you please give me some suggestions?

Thank you very much.

-- 

3. How to build EditText view like that in Android Market edit text (the top part)

4. video play on android-2.1_r1

5. use of RemoteViews.setOnClickPendingIntent() for status notification.

6. beli apps WAS Just got my N1

7. Press Release SE Xperia X10