Listing installed Cardboard apps
If you haven't forgotten, the purpose of this LauncherLobby app is to show a list of Cardboard apps on the device and let the user pick one to launch it.
If you like what we've built so far, you may want to save a copy for future reference. The changes we're going to make next will significantly modify the code to support a list of views as shortcuts to your apps.
We're going to replace the
addContent method with
addShortcut and the
textView variables with a list of shortcuts. Each shortcut consists of an
ImageView and a
TextView to display the shortcut, as well as an
ActivityInfo object for the purpose of launching the app. The shortcut images and text will appear on top of each other, as shown earlier, ...