[android-developers] Re: Go to the home screen.

2009-02-27 Thread deepdr...@googlemail.com

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


On 27 Feb., 04:40, Dianne Hackborn hack...@android.com wrote:
 And for heaven's sake don't call System.exit()!

 On Thu, Feb 26, 2009 at 10:50 AM, Marco Nelissen marc...@android.comwrote:







  On Thu, Feb 26, 2009 at 5:26 AM, Zack zhalbre...@gmail.com wrote:

   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!

  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.

 --
 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.- Zitierten Text 
 ausblenden -

 - Zitierten Text anzeigen -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Go to the home screen.

2009-02-27 Thread Zack

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

On Feb 27, 3:27 am, deepdr...@googlemail.com
deepdr...@googlemail.com wrote:
 you should just remove it from the Java implementation :-)

 On 27 Feb., 04:40, Dianne Hackborn hack...@android.com wrote:

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

  On Thu, Feb 26, 2009 at 10:50 AM, Marco Nelissen marc...@android.comwrote:

   On Thu, Feb 26, 2009 at 5:26 AM, Zack zhalbre...@gmail.com wrote:

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!

   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.

  --
  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.- Zitierten Text 
  ausblenden -

  - Zitierten Text anzeigen -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Go to the home screen.

2009-02-26 Thread Zack

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?

On Feb 25, 12:39 am, suhas gavas suhas.ga...@gmail.com wrote:
 hi
 onclick just write System.exit(1); and it will do the rest for u

 reagrds,
 Suhas

 On Wed, Feb 25, 2009 at 11:07 AM, ipeg.stud...@gmail.com wrote:

  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.

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



[android-developers] Re: Go to the home screen.

2009-02-26 Thread Zack

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!

On Feb 25, 12:25 am, Romain Guy romain...@google.com wrote:
 Or better yet, press theHomekey :)



 On Tue, Feb 24, 2009 at 9:25 PM, Romain Guy romain...@google.com wrote:
  Just press back :)

  On Tue, Feb 24, 2009 at 9:24 PM,  ipeg.stud...@gmail.com wrote:

  Hi All Android Developers...

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

  --
  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

 --
 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

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



[android-developers] Re: Go to the home screen.

2009-02-26 Thread Marco Nelissen

On Thu, Feb 26, 2009 at 5:26 AM, Zack zhalbre...@gmail.com wrote:

 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!

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.

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



[android-developers] Re: Go to the home screen.

2009-02-26 Thread Dianne Hackborn
And for heaven's sake don't call System.exit()!

On Thu, Feb 26, 2009 at 10:50 AM, Marco Nelissen marc...@android.comwrote:


 On Thu, Feb 26, 2009 at 5:26 AM, Zack zhalbre...@gmail.com wrote:
 
  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!

 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.

 



-- 
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.

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



[android-developers] Re: Go to the home screen.

2009-02-26 Thread IPEG Student
On 2/27/09, Dianne Hackborn hack...@android.com wrote:

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

 On Thu, Feb 26, 2009 at 10:50 AM, Marco Nelissen marc...@android.comwrote:


 On Thu, Feb 26, 2009 at 5:26 AM, Zack zhalbre...@gmail.com wrote:
 
  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!


 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.







 --
 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.


 
 Try this coding..



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.

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



[android-developers] Re: Go to the home screen.

2009-02-24 Thread Romain Guy

Just press back :)

On Tue, Feb 24, 2009 at 9:24 PM,  ipeg.stud...@gmail.com wrote:

 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.

 




-- 
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

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



[android-developers] Re: Go to the home screen.

2009-02-24 Thread Romain Guy

Or better yet, press the Home key :)

On Tue, Feb 24, 2009 at 9:25 PM, Romain Guy romain...@google.com wrote:
 Just press back :)

 On Tue, Feb 24, 2009 at 9:24 PM,  ipeg.stud...@gmail.com wrote:

 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.

 




 --
 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




-- 
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

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



[android-developers] Re: Go to the home screen.

2009-02-24 Thread suhas gavas
hi
onclick just write System.exit(1); and it will do the rest for u

reagrds,
Suhas

On Wed, Feb 25, 2009 at 11:07 AM, ipeg.stud...@gmail.com wrote:


 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.
 


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