I would like to compare challenging activity with others to find out which one is called current. I tried:
getCallingActivity().getClassName().toString().equals(MainActivity.class.toString())
This does not work except passing the value in the calling Intent, how can we compare classes using getCallingActivity() or getCallingPackage() ?
source share