Exploring the Smart Glasses
- 8 minutes read - 1572 wordsThis article describes the fundamentals of light-weight smart glasses such as Google Glass and Vuzix M100
It also explain the development practices with pros and cons of its usage, limitation and future of these glasses in our lives.
Google Glass Enterprise Edition
Google Glass enterprise edition is a plain Android based smart glass that you can wear and performs operations just like a smartphone and with the use of a small screen located in the front of your right eye can perform a decent range of tasks. Basically, they are nothing more than a pair of glasses powered by nothing less than Google cutting edge technology. The team behind Google Glass Geeks managed to put their hands on two pairs of Google Glass enterprise edition.
The google glass enterprise edition is built for the Enterprise Industry and is best suited for handsfree use case (for example Automobile Service Assistant).
Usage
The Google glass is equipped with a trackpad on the right side near the display. There are 4 main gestures to operate the glass.
- Slide forward/backwards: Slide forward or backwards to slide through various cards (forward for right and backwards for left).
- Tap: Tap to select any item.
- Swipe down: Swipe down to return to previous menu.
- Swipe down with 2 fingers: Swipe down with 2 fingers to return to home and turn off the display.
Specs
- Glass OS EE (Based on Android)
- Intel based chipset (OS is 32 bit)
- 2 GB RAM
- Sessors - Ambient Light Sensor, Inertial Measurement Units, Barometer, Capacitive Head Sensor, Wink (Eye Gesture) Sensor, Blink (Look-at-Screen) Sensor, Hinge Effect Sensor, Assisted GPS + GLONASS, Magnetometer (Digital Compass)
- 640 x 360 pixel screen
- Prism projector(equivalent of a 25 in, 64 cm screen from 8 ft./2.4 m away
- Wi-Fi and Bluetooth connectivity
- touchpad/voice commands.
- Screen can be casted over ADB
- Price tag at 1500$ US
- 1.5hours for heavy use and 3.2hours for medium usage, and 2.5hours of charging time
Hello World with Google Glass
Applications for google glass is built using Android Studio. Follow the steps below to build your first program for google glass.
Before getting into development, please understand the design principle of google glass here
- Open Android Studio
- Go to File> New Project
- Provide project and package name, and go Next
- Check the Glass option from check list and uncheck rest of the option and go Next
- Select Immersion Activity or Live card activity and click Next
- Edit activity name and package and click Finish
- Android studio will initialize a project with mentioned activity.
It generates following MainActivity Class
.....
/**
* An {@link Activity} showing a tuggable "Hello World!" card.
* <p>
* The main content view is composed of a one-card {@link CardScrollView} that provides tugging
* feedback to the user when swipe gestures are detected.
* If your Glassware intends to intercept swipe gestures, you should set the content view directly
* and use a {@link com.google.android.glass.touchpad.GestureDetector}.
* @see <a href="https://developers.google.com/glass/develop/gdk/touch">GDK Developer Guide</a>
*/
public class MainActivity extends Activity {
/**
* {@link CardScrollView} to use as the main content view.
*/
private CardScrollView mCardScroller;
/**
* "Hello World!" {@link View} generated by {@link #buildView()}.
*/
private View mView;
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
mView = buildView();
mCardScroller = new CardScrollView(this);
mCardScroller.setAdapter(new CardScrollAdapter() {
@Override
public int getCount() {
return 1;
}
@Override
public Object getItem(int position) {
return mView;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
return mView;
}
@Override
public int getPosition(Object item) {
if (mView.equals(item)) {
return 0;
}
return AdapterView.INVALID_POSITION;
}
});
// Handle the TAP event.
mCardScroller.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// Plays disallowed sound to indicate that TAP actions are not supported.
AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
am.playSoundEffect(Sounds.DISALLOWED);
}});
setContentView(mCardScroller);
}
@Override
protected void onResume() {
super.onResume();
mCardScroller.activate();
}
@Override
protected void onPause() {
mCardScroller.deactivate();
super.onPause();
}
/**
* Builds a Glass styled "Hello World!" view using the {@link CardBuilder} class.
*/
private View buildView() {
CardBuilder card = new CardBuilder(this, CardBuilder.Layout.TEXT);
card.setText(R.string.hello_world);
return card.getView();
}
}
Here it runs.
Known issues/constraints
Following are the list of known issues known to us,
- Glass gets hot while doing resource intensive tasks and becomes unusable.
- Battery life is not so great.
- Takes long time to charge.
Vuzix m100
Vuzix M100 Smart Glass is an android-based wearable device, it has a monocular display with a wide variety of enterprise applications on it. Vuzix M100 offers hand-free use of the glass with most of the Android smart-phone features.
Usage
The Vuzix M100 4 physical buttons which are used to control the input to the device.
- Forward button: The forward button is placed on the top front portion of the glass and slide through various cards/ menus in the forward direction.
- Backward button: The backward button is placed on the top middle portion of the glass and slide through various cards/ menus in the backward direction.
- Select Button: The select button is placed on the top back portion of the glass and helps to select any item or return to the previous menu if long pressed.
- Power Button: The power button is placed on the bottom back portion of the glass helps to turn the device/display on and off.
Specs
- Android OS 4.0.4
- OMAP4430 CPU at 1GHz
- 1 GB RAM
- Sensors and actuators - 3 DOF gesture engine (L/R,,N/F), Proximity, Ambient light, 3-degree of freedom head tracking, 3 axis gyro, 3 axis accelerometer, 3 axis mag/integrated compass
- 400 x 240, 16:9, WQVGA, full color display
- Wi-Fi and Bluetooth connectivity
- physical buttons and voice commands inputs.
- ADB connectivity
- At price tag 999.99$
- Battery - 1hours for heavy use and 3hours for light usage, and 1hour charing time.
Hello World with Vuzix M100
Install Vuzix SDK:
- Open the Android SDK Manager
- Go to Tools > Manage Add-on Sites… > User Defined Sites tab. > New…
- Enter https://www.vuzix.com/k79g75yXoS/addon.xml and OK
- Close it and the SDK Manager will refresh with the M100 SDK Add-on in the Android 4.0.3 (API15) and Extras sections.
- Select the add-on packages you want to install and click Install packages…
- Accept the license for each package you want to install and click Install.
- The SDK Manager will now start downloading and installing the packages.
- After the SDK Manager finishes downloading and installing the new packages, you will need to restart the android Studio before the Vuzix SDK is available to use for your apps.
Steps to use the SDK
- File > New Project > Select Android > Android Application Project and click Next.
- Set Minimum Required SDK to an API version no later than API 15, as this is the API version that runs on the M100.
- Set Target SDK: to API 15: Android 4.0.3 (IceCreamSandwich).
- Select Vuzix M100 Add-On (Vuzix Corporation) (API 15) from the Compile With: drop-down box.
- Everything else can be configured as you like.
- After the project has been created you will have access to all the Vuzix API libraries.
Hello World here
The following code can be used to create a voice controlled app to create and manipulate circles and squares (graphically).
MainActivity.java
//
// A simple activity class that allows us to use Vuzix Voice Control
// to create and manipulate circles and squares (graphically)
//
public class MainActivity extends Activity {
private ColorDemoSpeechRecognizer mSR;
private Canvas mCanvas;
private Bitmap mBG;
private ArrayList<ShapeInfo> mShapes;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// set up speech recognizer
mSR = new ColorDemoSpeechRecognizer(this);
if (mSR == null)
{
Toast.makeText(this,"Unable to create Speech Recognizer",Toast.LENGTH_SHORT).show();
return;
}
loadCustomGrammar();
Toast.makeText(this,"Speech Recognizer CREATED, turning on",Toast.LENGTH_SHORT).show();
android.util.Log.i("VUZIX-VoiceDemo","Turning on Speech Recognition");
mSR.on();
// Set up drawing canvas
mBG = Bitmap.createBitmap(432,200,Bitmap.Config.ARGB_8888);
mCanvas = new Canvas(mBG);
}
@Override
public void onDestroy()
{
if (mSR != null)
{
mSR.destroy();
}
super.onDestroy();
}
@Override
public void onPause()
{
android.util.Log.i("VUZIX-VoiceDemo","onPause(), stopping speech recognition");
if (mSR != null)
{
mSR.off();
}
super.onPause();
}
@Override
public void onResume()
{
super.onResume();
android.util.Log.i("VUZIX-VoiceDemo", "onResume(), restarting speech recognition");
if (mSR != null)
{
mSR.on();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
private void loadCustomGrammar(){
android.util.Log.i("VUZIX-VoiceDemo", "copyGrammar()");
final android.content.res.Resources resources = getResources();
final android.content.res.AssetManager assets = resources.getAssets();
try
{
final java.io.InputStream fi = assets.open("drawing_custom.lcf");
byte[] buf = new byte[fi.available()];
while (fi.read(buf) > 0){ }
fi.close();
mSR.addGrammar(buf,"Color Demo Grammar");
}
catch(java.io.IOException ex)
{
android.util.Log.e("VUZIX-VoiceDemo",""+ex);
}
android.util.Log.i("VUZIX-VoiceDemo", "Done writing grammar files.\n");
}
}
ColorDemoSpeechRecognizer.java
// our custom extension of the com.vuzix.speech.VoiceControl class. This class
// will contain the callback (onRecognition()) which is used to handle spoken
// commands detected.
public class ColorDemoSpeechRecognizer extends VoiceControl
{
private int mSelectedItem = 0;
public ColorDemoSpeechRecognizer(Context context) {
super(context);
}
protected void onRecognition(String result)
{
android.util.Log.i("VUZIX-VoiceDemo","onRecognition: "+result);
Toast.makeText(MainActivity.this,"Speech Command Received: "+result,Toast.LENGTH_SHORT).show();
}
}
This program shows are test when it recognizes the speech.
Known issues/constraints
Following are the list of known issues,
- Device is not well balanced.
- Display quality is not good enough.
- Battery life is very short.
Conclusion
The the smart glass are unique piece of technology with a lot of potential in the future.
It can be used in various domains where hands free is the key requirement and it can be used to improve the efficiency and effectiveness.
Though it suffers quite a few issues due to the lessor available technology in this time, but this is something that will overcome with time.
#xr #ar #google #enterprise #android #vuzix #smart-glass #tutorial #technology