You can test a compiled application package (APK) on the SmartEyeglass emulator that is included in the SmartEyeglass SDK. The emulator is an application that runs on any Android phone. You can, of course, also test directly on the SmartEyeglass device, if available.
Prepare the phone
Before you start your tests, you must download the SmartConnect and SmartEyeglass (the HostApp) apps from Google Play and install them on the Android device.
- The HostApp component handles communication between the Android device and the SmartEyeglass device or emulator.
- The SmartConnect component coordinates Sony accessory devices and the applications that have been extended to support them. (This is the new name for software formerly known as Liveware.)
Your individual SmartEyeglass application is associated with the SmartEyeglass-specific HostApp application installed on the Android device. It can also communicate with other hosts using the APIs for other Sony accessories.
- Download the the latest versions of the SmartConnect and SmartEyeglass HostApp components to your host Android device from Google Play.
- Install the Emulator app package on your Android device using the adb utility. In a command shell, change to the
/apks/ folder and run this command:
adb install SmartEyeglassEmulator.apk
- Install the app package for the application you want to test on your prepared Android device. To get started, you can use one of the samples. For example:
adb install HelloSensors.apk
Run the app on the emulator
The SmartEyeglass emulator is an Android app that you installed on your Android phone. When you run this app, you see a green UI that looks like what you would see on the SmartEyeglass device. A grey area on the lower-right part of the screen acts as the controller track pad; you can swipe and tap here to navigate through the cards. Swipe left-to-right on this track-pad area to scroll through the installed apps. Find your app and select it with a tap.
Prepare the SmartEyeglass device and run the app
If you are testing your application on the SmartEyeglass device itself, you must pair and connect it with your prepared Android phone, as described in the instructions that are included with your device.
When the device is paired and connected, the app that you installed on the Android device appears on the device as a card in the main menu. Swipe left-to-right on the controller’s track pad to find your app, and select it with a tap.