On Thu, Aug 23, 2012 at 7:10 AM, Juned Khan <[email protected]> wrote:
> Hi Andy,
>
> Use this code in your activity to do that,
>
> public void onBackPressed() {
> Intent intent = new Intent(Intent.ACTION_MAIN);
> intent.addCategory(Intent.CATEGORY_HOME);
> intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
> startActivity(intent);
>
> }
>
> Thanks
>
Did you read the OP's issue? Because this is not at all what he's trying to
achieve. This will start a new activity when the user tries to close the
activity, which is a pretty stupid thing to do.
-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en