I am using some various ad networks, they all require their own activity names to be added to the manifest.
I want to know when users click them, so I put in an override for startActivity(Intent intent)
but I need to inspect the intent object to conditionally set some values.
for instance, with tap for tap's network, it will launch an activity from the class com.ads.TapForTap
.. upon a click this will call startActivity(Intent intent) how do I get the name of the class from the intent?
thanks
You can use the given intent argument's component class name. Remember the class name might be empty!
intent.getComponent().getClassName()
try below line to get current activity name,
this.getClass().getSimpleName()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With