Tag Archives: software

How to launch a custom Android app in Google Glass

In this post, I’ll guide you on how to open a custom or your own app using the default voice commands in the Google glass.
I want to mention at this point, that to do this you need to have some knowledge on Android programing. And do this exercise in the emulator we created in our last post, don’t try it on the real glass because it may malfunction the glass, I have not tested it in the glass .Try it in your glass at your own risk.

If we see how the google glass works,  it will open a certain app(apk) using the package name for a predefined voice command.

As for now we don’t have  an sdk to develop our own voice command and an app to open from it. So what I am gona do here is replace a default app that will launch for a voice command and gona launch our own app instead.

In this example, I am gona replace glasscamera with my own app. To do so backup the glass camera app, and delete it from the glass.

First refactor the package name of your app to “com.google.glass.camera”
Now open your app’s manifest file
In the manifest file, change the package name in to “com.google.glass.camera”
Then change the Intent filter inside the activity tag of your app with this Intent filter

<intent-filter>
                <action android:name=”com.google.glass.action.TAKE_PICTURE” />
                <category android:name=”android.intent.category.DEFAULT” />
            </intent-filter>
Thats it now compile and install/push the apk into the glass/phone and nowSay the Command “Ok Glass”  “Take a Picture” TADAAAA…..!Now your app will open, instead of capturing the image…!