Using Google Glass with AppStudio: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Line 43: Line 43:


The sample linked to at the top of this article moves a red circle on the screen, based on your head movement. It uses "gravity", which means it moves faster as you increase the tile of your head. The app is a modified version of AppStudio's standard Accelerometer sample, with two modifications: The x and y values had to be multiplied by -1 to properly respond to the accelerometer data, and the z access had to be substituted for the y access (moving your head back and forth affected the z access).
The sample linked to at the top of this article moves a red circle on the screen, based on your head movement. It uses "gravity", which means it moves faster as you increase the tile of your head. The app is a modified version of AppStudio's standard Accelerometer sample, with two modifications: The x and y values had to be multiplied by -1 to properly respond to the accelerometer data, and the z access had to be substituted for the y access (moving your head back and forth affected the z access).
 
<br>
[[File:Googleglasssample.png|framed|left]]
[[File:Googleglasssample.png|framed|left]]
<br>


== Native Apps ==
== Native Apps ==

Revision as of 12:57, 13 November 2014

Move the Ball Sample

Hello World Sample

Overview

Google Glass is a wearable technology from Google. Since it runs Android and a browser, we experimented with running apps created with AppStudio on it. It works, but don't expect existing handheld apps to be usable on Google Glass. Much as moving from the desktop to handheld devices demanded a redesign of how apps work, you will want to rethink your apps for Google Glass.

Observations

  • AppStudio apps run as you would expect - no drama.
  • Both JavaScript and BASIC work fine.
  • No keyboard means no input controls.
  • jQuery Mobile controls work fine, but can be tricky to use.
  • No offline apps. Google Glass is designed to be connected full time.
  • No home screen, so no way to save to Home Screen.
  • To open the sample above, say "OK, Glass. Google NS Basic Google Glass". This page will appear. Put two fingers on the Google Glass touchpad and use your head to move the cursor to the link about. Click to start.
  • It's pretty quick. Using our benchmark, it clocked in at 300,000: a bit faster than an iPhone 4.
  • Screen size is 427x240.
  • You can use a larger screen size by scrolling (move your head with two fingers on touchpad) and zooming (move your two fingers back and forth on the touchpad).
  • Communications are by normal WiFi, or Bluetooth to your phone.
  • The phone is used for some of the heavy lifting, like GPS.
  • It interfaces with iOS and Android devices, but there are more features on Android
  • Updates to the Google Glass OS come monthly.
  • Google says this is an experimental technology. The hardware is quite nicely done: it will be interested to see how the software evolves.

Web Apps

The Glass browser has a few gestures to help control it. Move your head to scroll up, down, left or right. Put two fingers on the right side of Google Glass to zoom in and out. Tap to select a link. There is no way to do keyboard input.

Example 1: Hello World

It was easy to adapt the Hello World sample to run on Google Glass. After it is loaded, put two fingers on the side of the device, and move head so the cursor is on top of the button.

Tap the headset and this appears:

Example 2: Move the Ball

The sample linked to at the top of this article moves a red circle on the screen, based on your head movement. It uses "gravity", which means it moves faster as you increase the tile of your head. The app is a modified version of AppStudio's standard Accelerometer sample, with two modifications: The x and y values had to be multiplied by -1 to properly respond to the accelerometer data, and the z access had to be substituted for the y access (moving your head back and forth affected the z access).


Native Apps

Run your app on Google Glass

https://github.com/aphex/cordova-glass

SDK Manager.exe: Glass Development Kit preview

Connect device in debug mode.

If trouble, see this: http://stackoverflow.com/questions/16928983/google-glass-adb-devices-doesnt-find-omap4430-driver-not-installed-cant-find/17138336#17138336

Build command is cordova run.

http://hedgehogjim.wordpress.com/2014/03/17/google-glass-not-showing-in-android-adb-utility/

delete app: adb uninstall com.nsbasic.HelloWorld