O'Reilly logo

Android Wearable Programming by Steven F. Daniel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Transferring image data to the Android wearable

In our previous section, we looked at how we can send messages from our Android handheld device and display this information within our wearable watch area. In this section, we will take a look at the steps involved in downloading an image from the Internet, compressing the file contents in memory before sending this to the Android wearable, and displaying this within the watch area:

  1. From the Project Navigator window, open the MobileActivity.java file.
  2. Next, modify the onCreate(Bundle savedInstanceState) method and enter the following highlighted code sections:
     @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_mobile); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required