0

I have an app that is finished when I click the back button in certain activity, but it goes to a previous activity in a different device. I am thinking that the problem is with the android version.

It does that with the Galaxy SII (Android version 4.0), but with an HTC Evo (Android version 2.3.5) it goes back normally to all the previous activities that have not invoke the "finish()" method.

Any clue about what could be happening?

Note: There is not finish() in the activities I am talking about. It should go back as it actually does with the HTC EVO.

Sterling Diaz
  • 3,789
  • 2
  • 31
  • 35
  • 1
    are you specified any launchMode in manifest file.? – abbas.aniefa May 07 '13 at 14:40
  • Try overriding the onBackPressed() callback and then (without calling the super) do what you want the back button to do. That should make the behavior consistent. I think the difference in vendors may have something to do with what you are seeing right now. – Hahn Dec 06 '16 at 21:26
  • wow, just realized how old a thread this is – Hahn Dec 06 '16 at 21:27

1 Answers1

1

Go check if you have enabled 'Don't Keep Activities' in the developer options on your Galaxy S2. Disable that. This is an option available 4.0+. HTC Evo probably will not have this.

siddharthsn
  • 1,709
  • 1
  • 21
  • 32