Question

Just getting my hands around intent filters, and I've noticed a rather hit and miss approach to labeling intent-filters using android:label in both sample code and other online sources, yet haven't been able to find a definitive explanation for the purpose of labeling.

Can anyone point me in the right direction?

Thanks,

Paul

Was it helpful?

Solution

Basic example:

  • You have an app that opens text files (an activity with intent filters to do so)
  • Tere are more than one app to do so.
  • When the user opens a text file it will be presented with an options menu which allows him/her to decide which activity to use in order to open the text file.
  • The string you put in android:label for the intent filter is the string that the user will see in the alternatives menu.

It's explained in the official documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top