Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
and use this method
moveTaskToBack(true);
I'm developing an application and at the last activity I need to exit it, I have used the above methods which exits the application the problem is it exists the ONLY the activity and the appli
So I have 2 activities lets say A and B. A navigates to B, I want the activity A to be killed or make it unusable/unseen when directed from B.
so it should be like when I press the back button on B activity it should not open activity A instead it should go to the app tray.
also activity A should comeback when I clear the application data
thanks.
There are application with Activity order auto change
Log
Application start
01-07 17:30:55.178: E/ASE(11253): RouteListActivity.onCreate
01-07 17:30:55.208: E/ASE(11253): RouteListActivity.onResume
start secont activity
Intent intent = new Intent(getBaseContext(), PointListActivity.class);
startActivity(intent);
01-07 17:30:57.948: E/ASE(11253): RouteListActivity.onPause
01-07 17:30:57.
in my application having two activities like , activity A as main and launcher, and activity B, scenario : activity A started after launching app. started activity B from A, started another activity X of other application from B. now hitting BACK button of hardware, taking me to the Activity A. it actually should go back to the activity B , as it is the last activity.
When I create a "New Android Application Project," I would like Eclipse to proceed with its normal actions with (at least) one customization.
I want Eclipse to create the new Activity.Class file using fuller @Overrides rather than just the onCreate(), such as also providing onStart(), onResume(), onPause(), onRestart(), and so on.
Hi,
In my application I am calling the activity of another application. now I want to return some result from the called activity back to the calling activity(in parent application). Is it possible? If yes? how can I do that?]
Thanks.
There can be many activities in application and the last launched activity stay on top of stack and on pressing back it finish the current activity.I have a sequence of Activity and here is the flow ..
if we have A,B,C(1),D,C(2)...
Lately writing some app I've been stopped by one problem.
In this app I have two activities: A and B. In activity A I am downloading list of objects from web each time when GPS coordinates change. To this activity there is connected bound service with GPS and Internet connection call.
Hi guys
I wanted to ask : I have a first activity that opens the second activity in the Activity menu. I press exit in Activity 2 and would like you to also close the Activity 1. How to do this?