Test and verify
As in all development, testing and verification are essential steps in creating a SmartEyeglass app. These are the main options you have in order to test your SmartEyeglass:
- All functionality can be tested on the SmartEyeglass device. See “Test using hardware” below.
- You can also test most of the functionality in your SmartEyeglass app with the Sony SmartEyeglass Emulator, an APK that is included with the SmartEyeglass SDK. See details below about how to install and test using the emulator. Some of the features that depend on hardware in the SmartEyeglass device itself cannot be tested with the emulator. These features include settings for power and performance modes, sound effects, and variable screen depth. For more information, see the Settings guide.
Install the emulator app
The emulator runs on the host device for your SmartEyeglass. To test your app, you must set up the SmartEyeglass Emulator on a physical Android smart phone.
The host Android device must be running Android 4.4 or newer. To install the emulator and test your app:
- Download and install SmartConnect from Google Play.
- Connect the device to your computer with a USB cable
- Locate the Android package
SmartEyeglassEmulator.apkin the /apk folder of the SmartEyeglass SDK, and install it on the Android device using the adb command-line tool.
- Deploy the app extension on the Android device using adb.
- Launch the SmartEyeglass Emulator app.
Test an app using the emulator
In the emulator, the screen of the host device is split horizontally. The top part shows a black background overlaid with the green screen display for the home card.
(For an app that uses the camera, the top part of the emulator shows the phone’s camera view, which simulates the view of the environment seen through the transparent SmartEyeglass screen.)
The bottom part of the display simulates the controller’s buttons and control surfaces. You can swipe or tap in the touch-pad area, or touch to click one of the buttons.
- Swipe through the app entry cards at the top level to scroll to the app you want to test.
- When you see the app’s home card, tap in the controller touch-pad area to run your app. The emulator shows the first app-level screen display.
Test using hardware
If you have access to the SmartEyeglass device, this is the fastest and most accurate way to test your app. The following functions are not available in the emulator, and can only be tested on the device:
- Power/performance and standby modes
- Sound effects
- Variable screen depth
You should always verify on the hardware in any case, before publishing your app.
Your application runs on the host device, not on the SmartEyeglass itself; this means that you must have a Bluetooth or Wireless LAN connection active in order to run your app.
To test on the device:
- Make sure that the SmartEyeglass device is paired to the host device with Bluetooth or Wireless LAN.
- Make sure that you have the USB drivers installed on the host device, and that it can be seen from DDMS in your IDE.
- Connect the host device to your computer with a USB cable.
- Run your app from the IDE. This automatically installs the APK for the extension on your host device.
- On the SmartEyeglass device, tap the card for your app. This should run your app, and you should see the first screen you have defined on the device display.
If you have made changes in your code and need to redeploy the app, exit the app on the accessory then repeat steps 4 and 5.