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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.