A (175)

(Tuis.) #1
CHAPTER 15: Developing for Android Wearable Devices 555

Finally, there is the native or full SDK approach, which is obviously my favorite, and the most logical
one to use in this book as you can get right into creating your smartwatch applications without doing
anything extra to your Eclipse ADT installation. You simply have to create a new Android application,
and make sure that the tags in your Android Manifest XML definition file will specify
the correct minimum and target SDK versions, which for the Neptune Pine smartwatch are currently
set at Android 4.1 API Level 16.


The reason that this is my favorite approach, and eventually the approach that all other smartwatch
manufacturers will have to follow, is because the Neptune Pine is a full-blown Android device, just
like a smartphone or a tablet or an iTV set. The economies of scale in software development should
be readily apparent, but if you don’t see them, I will outline them here.


Since Android already provides for different resolutions and aspect ratios in the way that it sets up
its resource folders, especially the drawable-dpi folders, and the allowance for alternate resource
folders on top of that, this allows the developer to create an application that spans from the True
smartwatch (currently the Neptune Pine) up to the 4K iTV set using a single Android application
project hierarchy structure.


The other reason I have chosen to use the Neptune Pine for this wearables chapter in this book
is because you can simply take into account the Neptune Pine’s 320 by 240 pixel screen in your
graphic assets design, and jump right into developing an app for this smartwatch that also works
across all of the other Android device types, from smartphones to e-Readers to tablets to iTV Sets.


You will be able to develop for the Neptune Pine without installing anything new using the Android
SDK Manager, and without learning anything new regarding Android classes or development.


I am now going to cover some of the basic wearables development information, which I would
normally include as foundational information at the beginning of any chapter in the book. In fact,
in this case, this information will be included so that you will know how to optimize for peripheral
wearables, since they require that level of optimization due to their operation across a Bluetooth
wireless connection expanse. It is important to note that some of this type of optimization in built-in
to how the Wear SDK operates.


Smartwatch Optimization Fundamentals: Display and CPU


To know how to optimize your applications for the smartwatch device type, you need to know the
limitations of the hardware that you are developing for. Regarding smartwatch products, the current
primary limitation is the display size, which is usually around 320 pixels, either in both dimensions
such as the 320 by 320 Samsung Galaxy Gear, or in one dimension, such as the 320 by 240
Neptune Pine.


There are some lower resolution smartwatch displays still out there as well, such as the Sony
smartwatch 2’s 220 by 176 display, so be sure to know what the resolution is (in pixels) for the
smartwatch that you are developing for! With higher pixel density LCD, LED, and OLED displays
available for Wide HD (2160 x 1080) and UHD (2560 by 1440) smartphones that are coming out in
2014, you should see high-density 480 pixel (240 DPI), 640 pixel (320 DPI), and even 720 pixel (360
DPI) 2-inch screen smartwatch products coming out soon, probably during 2015 and 2016.

Free download pdf