Resolving an Implicit Intent

NerdLauncher will show the user a list of apps on the device. To do so, it will send an implicit intent that every application’s main activity will respond to. The intent will include a MAIN action and a LAUNCHER category. You have seen this intent filter in your projects:

 ​ ​<​i​n​t​e​n​t​-​f​i​l​t​e​r​>​
 ​ ​ ​ ​<​a​c​t​i​o​n​ ​a​n​d​r​o​i​d​:​n​a​m​e​=​"​a​n​d​r​o​i​d​.​i​n​t​e​n​t​.​a​c​t​i​o​n​.​M​A​I​N​"​ ​/​>​
 ​ ​ ​ ​<​c​a​t​e​g​o​r​y​ ​a​n​d​r​o​i​d​:​n​a​m​e​=​"​a​n​d​r​o​i​d​.​i​n​t​e​n​t​.​c​a​t​e​g​o​r​y​.​L​A​U​N​C​H​E​R​"​ ​/​>​
 ​ ​<​/​i​n​t​e​n​t​-​f​i​l​t​e​r​>​

In NerdLauncherFragment.java, override onCreate(Bundle) to create an implicit intent. Then get a list of activities that match the intent ...

Get Android Programming: The Big Nerd Ranch Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.