Overview

Sample Application Overview

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. Go to File > New >Import Project… in the Android Studio menu.

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

     Import sample project

 

 

Looking ​Over the Sample Application

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

select target layout

 

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

select wear round type

 

 

Running the Sample Application

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

 

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

     run app from short cut

     or

     run app from menu

 

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

     connect target device

 

The 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).

 

before and after pressing upview button

You can install and run the sample application (ObstructionSample.apk) included in the LG Watch SDK on the target device. To install the sample application onto the target device, enter the adb command in the command window as follows:

> adb install ObstructionSample.apk

 

Navigation