If I'm using an accessibility service to get the activity that user currently has opened anywhere on their device, is event.getClassName() enough to distinguish this activity from any other activity on the device?
@Override
public void onAccessibilityEvent(AccessibilityEvent event) {
if (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED) {
Log.i(TAG, event.getClassName());
}
}
So is it enough or is it possible that getClassName() might be the same for another activity? Meaning do I have to include event.getPackageName() as well to ensure the activity name is unique?