I have a problem with navigation in an android app with FLAG_ACTIVITY_NO_HISTORY
and startActivityForResult
.
Here is an example:
I have page A and page B. I go from A to B with the FLAG_ACTIVITY_NO_HISTORY
. Then I take a picture with startActivityForResult
.
The problem is, now I get back to page A, but I want to get back to page B.
When I remove the FLAG_ACTIVITY_NO_HISTORY
I have page B in the history which I don't want to have.
How to resolve this problem?
Use the history, but when you come back to your page B, just call this.finish(). This activity will end. You will probably see your page B for a second (could be depend on your code, to test).
Hope this solution could help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With