Plugin to add Google Glass Support to your Cordova Application. Additional JS plugin allows developer to get voice prompt speech to text results.
Ross Gerbasi0.0.211
platforms: android
$ cordova plugin add

Cordova Glass Core

This plugin will not get further updates as it has been merged into the Cordova Glass Plugin that contains all the same features plus touch and gesture event processing.

This plugin modifies the Android platform in your Cordova based application with Google Glass Compatibility. At its most basic usage it will allow you to launch your application via a voice trigger. Advanced usage allows for voice prompts to be captured during the launch process and sent into the application.

Basic Usage

Add plugin via Node

cordova plugin add

Modify Voice Trigger located in {app}/platforms/android/res/values/glass.xml

<string name="app_launch_voice_trigger">hello cordova</string>

Voice Trigger Prompt

A Voice Trigger prompt allows your application to ask the user for voice input before the application launches. An example of what this might sound like could be

  • 'Ok Glass' (wake up glass for voice input)
  • 'Open movie search' (launch your movie search application)
  • 'Goodfellas' (capture a voice trigger prompt from the user)

To use first uncomment the following line from {app}/platforms/android/res/xml/app_launch_voice_trigger.xml

<input prompt="@string/app_launch_voice_prompt"/>

Then modify Voice Trigger Prompt located in {app}/platforms/android/res/values/glass.xml

<string name="app_launch_voice_prompt">prompt question</string>

After your application has received a 'deviceready' event you will be able to retrieve the input from the user as shown in the follow where 'results' is a array.
    function(results) {
    function () {
        console.log("Error getting launch Params");


The following config.xml preferences are available via this plugin


<preference name="" value="false"/>

Setting this to true will force your application to always stay on, no screen dimming. A User will need to exit your application via a swipe down gesture to close it.