I need to get an unique id of an android activity instance. I'd like to take the string which the activitymanager writes in the log (for example: ActivityManager: Activity pause timeout for HistoryRecord{450495a0 ...}), but I don't know how to get it.
Does someone know how I can get this string? Or is there another unique id for each activity instance?
every where in your project :
MainActivity.class.hashCode();
in Activity
this.hashCode();
You can even get hashCode
from context
Maybe you can use Activity's hashCode.
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