How to clear activity's stack?

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

How to clear activity's stack?

Postby AndreySerj » Wed Dec 26, 2007 10:05 am

Hi all,
"When a new screen opens, the previous screen is paused and put onto a history stack. The user can navigate backward through previously opened screens in the history. Screens can also choose to be removed from the history stack when it would be inappropriate for them to remain. Android retains history stacks for each application launched from the home screen"


How can I access activity stack in order to clear it ?
AndreySerj
Developer
Developer
 
Posts: 31
Joined: Wed Dec 26, 2007 9:57 am
Location: Minsk

Top

Postby plusminus » Wed Dec 26, 2007 11:38 pm

Hello AndreySerj,

I'm not sure if what you are trying is possible at all, because this should be the part of the AndroidOS :!:
Such a program would be more like a deep hack, also could be used for Malware...

So, I have seen no info on touching another Activity on the ActivityStack.

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Re: How to clear activity's stack?

Postby tum0rc0re » Thu Dec 27, 2007 6:00 am

AndreySerj wrote:Hi all,
"When a new screen opens, the previous screen is paused and put onto a history stack. The user can navigate backward through previously opened screens in the history. Screens can also choose to be removed from the history stack when it would be inappropriate for them to remain. Android retains history stacks for each application launched from the home screen"


How can I access activity stack in order to clear it ?


If you want to remove current Activity, you can call its method finish(). To manage total history stack I think it's impossible, as there's as STACK or you can to manage it using LIFO's principle. History stack isn't free-managed list :) only LIFO :) It's safely, imho.
JQ Soft web page:
[b][url=http://jqsoft.ru/]http://jqsoft.ru/[/url][/b]
My proffesional blog: [b][url=http://maximyudin.blogspot.com]http://maximyudin.blogspot.com[/url][/b]
Facebook: [b][url=http://www.facebook.com/maxim.yudin]http://www.facebook.com/maxim.yudin[/url][/b]
User avatar
tum0rc0re
Senior Developer
Senior Developer
 
Posts: 158
Joined: Sun Nov 25, 2007 7:15 am
Location: Moscow, Russia

Postby AndreySerj » Thu Dec 27, 2007 8:21 am

Thanks, finish() - It's my case ;-)
AndreySerj
Developer
Developer
 
Posts: 31
Joined: Wed Dec 26, 2007 9:57 am
Location: Minsk

Re: How to clear activity's stack?

Postby vibhuarya23 » Mon Sep 19, 2011 2:18 pm

Can we make our activity not to get stored in recent history of android
Vibhu
vibhuarya23
Freshman
Freshman
 
Posts: 4
Joined: Mon Sep 21, 2009 7:20 pm
Location: Gurgaon

Top

Return to General

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests