LG Watch

SAMPLE CODE

Download SDK

LG WatchDownload SDK

The LG Watch SDK package contains a sample application. With this sample application, we will take a look at what functions you can implement on a LG Watch.

Importing the Sample Project

To run the sample application, import the sample project as follows:

  1. 1. Go to File > New >Import Project… in the Android Studio menu.
  2. 2. Select a directory where a sample project is located and click OK.

    2. Select a directory where a sample project is located and click OK.

Looking ​Over the Sample Application

  1. After importing the sample application, you can see the following screen at the activity_main.xml file in app > res > layout.

    After importing the sample application, you can see the following screen at the activity_main.xml file in app > res > layout.

  2. If you change the device from Nexus 4 selected by default to Wear Round, you will see the screen changed as below.

    If you change the device from Nexus 4 selected by default to Wear Round, you will see the screen changed as below.

Running the Sample Application

To check the sample application on the target device, run the sample application as follows:

  1. 1. Connect the target device and click Run button or Run > Run ‘app’ in the Android Studio menu.

    Connect the target device and click Run button or Run > Run ‘app’ in the Android Studio menu.

  2. 2. Select the connected target device from the “Select Deployment Target” screen and click OK.

    Select the connected target device from the “Select Deployment Target” screen and click OK.

he images below show the screen of running the sample application on the target device.

If you install and run the obstruction sample application on a device that does not use an obstruction display, such as LG Watch Sport and LG Watch Style, you can see the screen where the LG logo is centered like Figure (a).

If you run the same application after installing it on LG Watch W7, which uses the obstruction display, you can see the screen with the layout changed dynamically as shown in Figure (b).

When running on LG Watch Style, When running on Lg Watch W7

> adb install ObstructionSample.apk