Example Phonegap project that can be imported to Eclipse and exported as .apk file for Google Glass. The JavaScript includes touchpad events and accelerometer events via the Phonegap API. More detailed instructions can be found here
##Prerequisites
- Make sure Glass Debugging is turned on
- Connect your Glass via USB to your computer
- On your mobile device, turn on Glass screencast
- On your computer, [Install Phonegap] (https://dl.dropboxusercontent.com/u/348446/trainings/android.html)
##Directions
- Clone this
<googleglass-phonegap-example>
repository - In Eclipse, File > New > Other (Cmd + N)
- Android > Android Project from Existing Code
- Under Root Directory, select
<googleglass-phonegap-example>/example/
or whatever you named the cloned repository - Select the checkbox next to
example
- Select Copy projects into workspace
- Select Finish
- In the Package Explorer on the left-hand side, right-click on
example
- Select Properties (Cmd + I)
- Under Android select
Glass Development Kit Sneak Peek
as the Project Build Target > Target Name - Make sure your Glass is connected over USB. You can now hit Run Example to see the results. You can run the app by going to your menu from the "ok glass" prompt and selecting the "PhoneGap App"
- Make changes to JavaScript, HTML, and CSS in the
<googleglass-phonegap-example>/example/assets/www
directory
##Debugging
- Download and install Android Debug Bridge (adb)
- In Terminal,
cd
to<adt-bundle...>/sdk/platform-tools
- run
./android update adb
- run
./adb kill-server
- run
./adb start-server
- run
./adb devices
- make sure Glass Serial Number is detected
- run
##References
- Phonegap Docs
- Android Debug Bridge aka 'ADB'
- Glass GDK