Android: How to clear activity stack from widget
Is there a way to clear activity stack from widget?
I have following situation: From widget user presses button what starts new activity A. Next user move from A to new activity B. After that he presses 开发者_JAVA技巧home button which takes him back to home screen. Now if he presses button again, he will be moved directly to the activity B.
I thought ACTIVITY_FLAG_CLEAR_TOP would help, but it didn't.
Does activity A start activity B? If so you can start it with the FLAG_ACTIVITY_NO_HISTORY flag to specify not to put B in the history stack.
精彩评论