2014-04-16

Update Google Glass to XE12.1 and then to XE16 - Changelog

Hi guys,
we were waiting for this moment!
The new version of XE16, is out and all you have to do to get Android KitKat working on your device is:
    1. Update to XE12.1 which is a minor and fast update
    2. After finishing, reboot your device and update to XE16  
Check this out to view the main changes.

2014-04-02

How to install the iOS myglass app outside the US on iPhone and iPad

Hi guys,

Maybe is already known that the iOS version of myglass app is only available on the american app store. 

So if you want to control glasses from your Apple device but you live abroad all you need to do is:
1) create an american apple id as shown here (even if it's in italian, pictures are quite explicative and easy to understand) 
2) log into iTunes using your new account
3) locate "myglass", then download and install it on your device 

and... that's all folks!

2014-01-16

How to upload files using google drive from glass

As there is no way of using Intent.ACTION_SEND on Google Glass I found a tricky workaround to upload files generated by your custom apps directly on Google Drive.


1) Download google drive apk from here
2) In your Activity:

import android.support.v4.app.ShareCompat;

Uri pdfUri = Uri.parse("file://sdcard/sdcard0/test.pdf");                
Intent shareIntent = ShareCompat.IntentBuilder.from(this)
                                     .setText("Share PDF doc")
                                         .setType("application/pdf")
                                         .setStream(pdfUri )
                                         .getIntent()
                                 .setPackage("com.google.android.apps.docs");

startActivity(shareIntent);

If you need to upload data from a Service instead of an Activity all you have to do is creating a "dummy activity", insert the above ShareCompat code in the onCreate() method and put finish() after the startActivity(shareIntent) command.


Other Intents can be targeted with similar code, changing the package name, e.g.
  • com.dropbox.android = Dropbox
  • com.android.bluetooth = Bluetooth
  • com.android.email = Email
  • com.google.android.gm = Gmail
  • com.microsoft.skydrive = Skydrive
  • com.google.android.apps.docs = Googledrive

2014-01-03

Opening camera service after voice trigger

Today I added camera support to my google glass app.
The application worked like a charm when launched it through the custom launcher but I was surprised by the fact that starting it with the voice command "ok glass" resulted in a "failed to connect to camera service" Runtime Exception.

Surfing the net, I discovered that this is a common issue (take a look at this).
It seems that the delay between the voice recogniser closing event and the camera open event is causing a memory overload.
Someone succeeded in avoiding the problem by pausing the app for a certain time (1000 Milliseconds) before opening the camera.

However this solution didn't work for me, maybe because I'm using XE12. However I found out that if you say "Ok glass" and wait for 2 seconds before you say the app name it works flawlessly.

As this is not a very "professional and scientific" solution I will review this problem in the future, so stay tuned.

2014-01-02

Fixed broken custom launcher for XE12 - bluetooth keyboard pairing

After the release of XE12 (the one which broke the custom launchers) I was looking for a way to fix the problem of launching Settings.apk in order to pair my i10 bluetooth keyboard with Google Glass.
Googling a little bit I came to the following solution and it seems to work fine:

  1. Download Glass Launcher  (which has been updated for XE12) and import it in Eclipse as a new project.
  2. Right click the project you just created and select "android tools" and then "add support Library...". if you skip this step Eclipse will not succeed in converting the source code into dex
  3. Now install Settings.apk 
  4. Now turning on our Glass and swiping left you'll have the possibility of launching Settings from the Glass Launcher Card.
  5. Open Settings, tap on bluetooth and start inquiring for nearby devices.
  6. Select your bluetooth keyboard and follow the on-screen instructions to pair it.

2013-12-19

A workaround to launch custom apps after XE12 update

Yesterday morning, as usual after coffee, I wore my glasses and made a terrible discovery: both launcher and launchy (custom launchers)  had stopped to launch my custom app. In fact, tapping on Settings, instead of the pop-up menu that usually showed the launcher and launchy, an empty menu appeared.

Googling the web I noticed that a new firmware version called XE12 had just been released, so I started hating the auto-update function...


With XE12, "Mom google" put us in trouble by breaking the functionalities of the custom launchers.


Since there is still no standard way to  launch non-native in-house developed apps I found a useful trick:


How to launch a non-native app saying "ok glass: _appname_"

  • Inside the manifest file add these tags under the Service or Activity which you want to trigger on your voice command.

<intent-filter>
   <action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
   android:name="com.google.android.glass.VoiceTrigger"
   android:resource="@xml/voice_trigger_start" />

  • Create a folder called xml inside res and add a xml file named as voice_trigger_start.xml.
  •  Inside that add these lines:
<?xml version="1.0" encoding="utf-8"?>
<trigger keyword="@string/voice_command" />

  • Open the values folder inside the res folder and edit strings.xml, so it will look like this
<resources>
   <string name="app_name">Your App</string>
   <string name="voice_command">Wayfinding</string>
   <string name="stop">Stop</string>
</resources>

  • Now install the app onto Glass and say: "ok glass, wayfinding" and the app opens.