Check If Activity Has Been Called for Result
When your activity was started just by startActivity() a getCallingActivity() method in target activity will return null. When it was called by startActivityForResult() it will return name of calling activity. See Docs for getCallingActivity(): Return the name of the activity that invoked this activity. This is who the data in setResult() will be sent to. … Read more