android - how to fire an activity from a given activity object -


i have saved object of activity in variable. exit activity. want can use object of activity restart same activity.

is possible launch intent of object of activity

i not sure of trying hope can help.

you can resume resume left in stack activity launching intent activity , setting flag (via intent.setflags method) flag_activity_clear_top clear top of current stack , bring (if exists) called activity.

you may consider using sharedpreferences save activity state , resume can skip heavy tasks or whatever want.

anyway far know shouldn't keep or pass activity item surely leak:

cf: android how avoid memory leak.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -