Using NerdLauncher as a Home Screen

Who wants to start an app to start other apps? It would make more sense to offer NerdLauncher as a replacement for the device’s Home screen. Open NerdLauncher’s AndroidManifest.xml file and add to its main intent filter.

Listing 23.10  Changing NerdLauncherActivity’s categories (manifests/AndroidManifest.xml)

<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    <category android:name="android.intent.category.HOME" />
    <category android:name="android.intent.category.DEFAULT" />
</intent-filter>

By adding the HOME and DEFAULT categories, NerdLauncherActivity is asking to be offered as an option for the Home screen. Press the Home button, and NerdLauncher will be offered as an option (Figure 23.11).

Figure 23.11  Selecting a Home app

Selecting a Home app

If you make NerdLauncher the Home screen, you can easily change it back later. Launch the Settings app from NerdLauncher. Go to SettingsApps & Notification. Select NerdLauncher from the app list. (If you do not see NerdLauncher listed, select See all apps to expand the list and scroll until you find NerdLauncher.)

Once you have selected NerdLauncher, you should be on the App Info screen. Expand the Advanced settings list and select Open by default. Press the CLEAR DEFAULTS button. The next time you press the Home button, you will be able to select another default.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.166.214