Why does an “Intent Selector” exists, what is it u

2019-02-18 23:08发布

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 that why did Android need to add this API ? What was breaking in Intent before this API ?

1条回答
仙女界的扛把子
2楼-- · 2019-02-18 23:53

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

查看更多
登录 后发表回答