I have two separate activities that both can reference a third activity. Basically I wanted the third activity to understand which of the two has called it, and then return to that activity when the time is appropriate. I have seen and understand the “putExtra”, but passing it off as a string, and then using string functions (such as .equals()), seems to be an inefficient way to understand what to return to. Is there a better way of doing this that I’m not familiar with?
I have two separate activities that both can reference a third activity. Basically I
Share
If your activity started as Activity for results then you can use getCallingActivity, otherwise it seems only option is pass something as part of Bundle to identify which activity called the other activity.