Search code examples
androidandroid-intentintentfilter

2 Intent Filters, 1 Activity - Which opened it?


Is there a way to know which Intent Filter is responsible for launching an Activity which has two Intent Filters defined in AndroidManifest.xml? I want a slightly different set of logic, but not enough that should require a whole new Activity.

Thanks!


Solution

  • Never mind, found it. Just wasn't looking hard enough...

    Using this.getIntent().getAction() in your Activity will spit out exactly what I was looking for, a String to identify which Intent Filter Action opened it.