Tag Archives: ware

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…!

Advertisements

All What you need to know before start developing for Google Glass (Infographic)

google_glass_dev_kinvey

Ok then, In my next post we will see how to install Google Glass Software in our Android Phone without rooting the phone(So in future till we get a proper emulator we can use it)…!

Info graphic Image Source : http://readwrite.com/2013/05/30/everything-you-need-to-know-to-get-started-with-google-glass-development

Google Glass Deep Inside(In Programers’ View )

Basically the Google Glass runs Android OS. It means if you know Android(or Java) you can easily write apps for the glass.

If you want a basic idea about what is google glass please read my previous post.

But there are some important stuffs you have to look into and research, before you jump into the app development. With limited hardware resources, the capability of the devices is restricted. At the time of writing this article the Explorer Edition 7 update is released and we can do some stuffs like, take a photo, record a video, start a hangout, send an email, browse web and some other stuffs.

The device is not like phone, where it does not have a touch display, the glass works by voice commands and mostly by tapping and scrolling the side of the glass. So you cannot expect to add buttons sliders. Still an SDK is not released to develop app for the glass.

If you have been wondering on what would it take for someone to get up and running with google glass development. Following is a list of technologies that forms the technology stack for google glass:

  • Web service protocol: REST
  • Message format: JSON
  • Google Mirror  API: Java, .NET, PHP, Python, javascript, Ruby

Well, we can start on with what Google Glassers have termed as “Glassware“. Glassware is a piece of software built on top of Google Mirror API. Google Mirror API is a set of Restful web services which help to communicate to and fro with google glass devices. Lets look at the diagram below to understand a little better.

GoogleGlass1

Above depicts interaction between google glass device and glasswares based on google mirror API.

What one can do using Google Mirror API?

  • Creating new cards on a timeline
  • Updating current cards on a timeline
  • Receiving user-initiated input exposed through a card’s menu
  • Subscribing to notifications from Glass devices to be notified of user actions

lets see the Google Glass – Mirror API – Glasswares – High Level Architecture

google-glass-high-level-architecture

Lets try and understand the above architecture:

  • Glass users subscription to your service: You develop one or more web-based service for google glass and publish. These services can be termed as glasswares. Glass users subscribes to your service by logging on to your website authenticating themselves using OAuth 2.0
glass camera
User subscription by visiting a glassware site
  • Glassware updates using Mirror API: Your google glassware then starts publishing to google glass cloud using mirror API. To be able to that, you must register your service with google cloud.
  • Google Glass synchronizes with glass device: This is third aspect. Once your glassware publishes to google cloud using mirror api, google glass then synchronizes your updates to your subscribed users.

You can control the glassware sites you have subscribed by logging in to MyGlass account . You can access this with the MyGlass Android App too.

final
User can On and Off Notifications to glass from this online site

In the above image you can see my glassware “Batman’s Layer” is listed with the other glasswares I have subscribed.

Ok then In my next post we will see what you needed to start developing for Google Glass …!

References: http://vitalflux.com/tag/google-glass-2/page/2/