Application integration

Glass EE2 is conceived mainly as a single purpose tool for Enterprise. In most cases, partners develop their own experiences, which include a launcher or kiosk mode app that takes over the experience from the moment Glass boots up.

Launcher

Out of the box, Glass comes with basic Launcher and Settings apps to demonstrate the device.

In order to add your application to the basic Glass launcher, you need to build your app with a few extra lines in the manifest as follows:

<activity
    android:name="com.example.android.glass.cardsample.MainActivity">
    <intent-filter>
        <action
            android:name="android.intent.action.MAIN" />
        <category
            android:name="android.intent.category.LAUNCHER" />
        <category
            android:name="com.google.android.glass.category.DIRECTORY" />
    </intent-filter>
</activity>

Settings

The Glass Settings app allows users to check the battery level, connect to Wi-Fi and Bluetooth, modify the volume and brightness, factory reset, and to check the update level of the device.

When you connect to a Wi-Fi network with a password, you must use a QR code that should comply with Wi-Fi network configs.

One easy way to generate the Wi-Fi code is to use a generator such as QiFi.

Applications can use the following intents to take advantage of the Glass Settings UI:

  • To launch the Glass Settings app, start it as any other Android activity:

    adb shell am start -n com.google.android.glass.settings/.MainActivity
  • To launch a specific page in Settings, Glass supports the following actions:
    • adb shell am start -n com.google.android.glass.settings/.MainActivity -a android.settings.BATTERY_SETTINGS
    • adb shell am start -n com.google.android.glass.settings/.MainActivity -a android.settings.BLUETOOTH_SETTINGS
    • adb shell am start -n com.google.android.glass.settings/.MainActivity -a android.settings.WIFI_SETTINGS
    • adb shell am start -n com.google.android.glass.settings/.MainActivity -a android.settings.VOLUME_SETTINGS
    • adb shell am start -n com.google.android.glass.settings/.MainActivity -a android.settings.BRIGHTNESS_SETTINGS
    • adb shell am start -n com.google.android.glass.settings/.MainActivity -a android.settings.DEVICE_INFO_SETTINGS
  • EE2 is an OS that performs only one task at a time, there's no multitasking UI. This means that each activity must handle its own exit so that it can return back to the caller activity by standard Android mechanisms.

    When the Glass Settings app is invoked through an intent that targets a particular setting, it handles the swipe down to leave this screen in a different way, so that it can finish the activity and return to the caller.