Navigate back to Home Activity?

You should use: FLAG_ACTIVITY_REORDER_TO_FRONT developer.android.com/reference/android/... If set in an Intent passed to Context.startActivity(), this flag will cause the launched activity to be brought to the front of its task's history stack if it is already running. For example, consider a task consisting of four activities: A, B, C, D. If D calls startActivity() with an Intent that resolves to the component of activity B, then B will be brought to the front of the history stack, with this resulting order: A, C, D, B.

This flag will be ignored if FLAG_ACTIVITY_CLEAR_TOP is also specified.

Be sure that you put your AsyncTask calls, or anything else you use to initialize the class, in onCreate() instead of onResume(). Unless Android garbage collected the instance the activity should load right back up. It might reload though if the activity was garbage collected.

– dbaugh Sep 18 at 13:09 Thanks, I thought this would be complicated, you made my day :) – MoshErsan Sep 18 at 13:11 @dbaugh, this FLAG is the same as you finish() the current Activity, and go back to Previous Activity, isnt it (convention)? – MoshErsan Sep 18 at 13:13.

I used FLAG_ACTIVITY_CLEAR_TOP for home button in my activities. If you have your HomeActivity already in application stack, this flag causes close of all activities above your HomeActivity. It depends if you need to reorder HomeActivity to front (Back button will return you back to activity where you clicked home) or you want to close all activities that are above HomeActivity (like clicking back until I'm in HomeActivity, in my case Back button closes application from my home activity).

developer.android.com/reference/android/....

LogonAct is a logon activity which I want to force the user to go through each time they return to the application. I've set android:clearTaskOnLaunch="true" on LogonAct. Why is it bringing me back to MainAct?

Shouldn't that activity haven been closed since LogonAct has android:clearTaskOnLaunch="true". I expected to be brought back to Home when I hit the Back button from LogonAct. Relevant snippets from AndroidManifest.

Any help appreciated.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions