Why does an “Intent Selector” exists, what is it used for?

后端 未结 2 1356
忘掉有多难
忘掉有多难 2021-01-13 22:33

Android\'s Intent class provides an API called setSelector. I am trying to understand it from the example given in the documentation.

I want to ask tha

2条回答
  •  走了就别回头了
    2021-01-13 23:29

    According to my understanding, it gives choice to user which intent he wants to select. In that documentation they have given that it gives selection of intents whether user wants to open app's main activity or wants to launch any diff app/activity other than user's app. This is what i understood from that documentation. Check this links for your reference : https://code.google.com/p/android/issues/detail?id=67162 & http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4_r1/android/content/Intent.java#Intent.setSelector%28android.content.Intent%29

提交回复
热议问题