Search code examples
androidandroid-activity

Is there a way to know from the end of which activity another activity is resumed


I have an Activity A that uses an intent to go to Activity B. Sometimes Activity A start also another activity, Activity C.

Is there a way for Activity A to know from which Activity (B or C) it is restarted when these activities finish?


Solution

  • Use a static variable to store the last activity started, so when activity A is resumed, you can check it.