If you start the activity with startActivityForResult(Intent, int), then you can get calling activity by getCallingActivity().getClassName().
If you start the activity with startActivityForResult(Intent, int), then you can get calling activity by getCallingActivity().getClassName().