Say I have an Intent like this:
Intent intent = new Intent(context, MyActivity.class);
I then want a method that will return true for the following:
boolean found = intent.getSomeMethodToRetrieveActivity() instanceof MyActivity;
Basically is there any way to find out what Activity the intent resolves to?
any ideas?
EDIT
Perusing the src I can see I can get the class name like this:
intent.getComponent().getClassName()
which will return "com.my.package.MyActivity
" which is close but I'd like to use instanceof
I just ended up using equals()
like in my question with:
intent.getComponent().getClassName()