572 CHAPTER 15: Developing for Android Wearable Devices
There are two approaches to this—one is to depend on the Android Support Library and develop for
the latest API level and the other is to “manually” develop for the exact API level the device needs.
You target the exact device by doing what you are doing here in the AndroidManifest regarding using
the
Pine device uses Android 4.1.
Since you are testing on an actual Neptune Pine, you can try both settings and see how it works. If
it works with the latest API, use that for the sake of cross-device compatibility if your app is going to
run on smartphones, tablets, game consoles, phablets (phone-tablets) and iTV Sets as well.
The only thing that you as a developer will have to be careful of with this manual approach is to use
classes, methods, and constants that are supported in API Level 16 (4.1.2) and prior API levels
(1 through 15).
So you can ignore the warning, and use the Run As ➤ Android Application process to compile
and run the app. In this way, you can generate the new EarthTime.APK file that has all of these new
digital image assets in it. I also added the earthtime480.png (drawable-hdpi) and earthtime640.png
(drawable-xhdpi) files into the /res folders.
As you can see in Figure 15-25, at the far left, the new icon is now in the ActionBar and the app
looks much more professional. As you can also see on the right in Figure 15-24, the EarthTime.APK
is now 2MB with all of the high-resolution image assets and icons installed.
Figure 15-25. Compile the EarthTime.APK using the Neptune Pine emulator and locate the file in the /bin folder
Figure 15-24. Mouse over the warning icon next to the