March 2013
Beginner to intermediate
580 pages
16h 11m
English
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:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
In NerdLauncherFragment.java, override onCreate(Bundle) to create an implicit intent. Then get a list of activities that match the intent from the PackageManager. For now, just log the number of activities that the PackageManager returns.
Listing 23.2 Querying the PackageManager (NerdLauncherFragment.java ...
Read now
Unlock full access