Thursday, December 19, 2013

MyGlass for iOS available on App Store

MyGlass app for iOS is now available on the App Store after a brief appearance a few days ago. MyGlass on iOS required that your glass are in the XE12 version.






To update your Glass, go to Settings (swipe back) > Device Info Card > Tap > Update Device.

The MyGlass app lets you set up, configure, and mange your Google Glass on the go. You can also use it to get directions and more.

MyGlass on App Store

Wednesday, December 18, 2013

Google Glass XE12 Release

Hi all,

XE12 Release 

During thanksgiving, I got my Google Glass Wear. It's a really interesting and exciting new device, you can see them as an extension of your smartphone. But you can do really more : Face Detection (even if Google don't want... ), Voice Control. You can imagine a lot of new usages and business.

At the beginning, just an Android Apps was available MyGlass, if you would to use the GPS or Send a message, you needed a Android phone.

Now, you can do almost the same with an iPhone, MyGlass will be available this week on the App Store : Read this post

All information about the new release: XE12 Release Note


UPDATE 12-18-2013 : Cool feature, you can wink to take a picture. You just need to calibrate the Google Glass in the Setting Menu.

My First Project : Face Detection

Just after to receive my new Glass, my first idea has been to create an Face Dectection App. I can not publish this application in the Glass Store because it's not authorize by Google.
At the beginning, I tried to use the API : Camera.FaceDetectionListener but It sounds like is not available on the Google Glass.


1.   public void onPreviewFrame(byte[] data, Camera camera) {
2.   Log.d(TAG, "onPreviewFrame");
 
3.   // face detection: first convert the image from NV21 to RGB_565
4.   YuvImage yuv = new YuvImage(data, ImageFormat.NV21,
                         i.   mWorkBitmap.getWidth(), mWorkBitmap.getHeight(), null);
5.   // TODO: make rect a member and use it for width and height values above
6.   Rect rect = new Rect(0, 0, mWorkBitmap.getWidth(), mWorkBitmap.getHeight()); 
 
7.   // TODO: use a threaded option or a circular buffer for converting streams?  
8.   //see http://ostermiller.org/convert_java_outputstream_inputstream.html
9.   ByteArrayOutputStream baout = new ByteArrayOutputStream();
10.  if (!yuv.compressToJpeg(rect, 100, baout)) {
11.        Log.e(TAG, "compressToJpeg failed");
12.  }
 
13.  BitmapFactory.Options bfo = new BitmapFactory.Options();
14.  bfo.inPreferredConfig = Bitmap.Config.RGB_565;
15.  mWorkBitmap = BitmapFactory.decodeStream(
16.           new ByteArrayInputStream(baout.toByteArray()), null, bfo);
 
17.  Arrays.fill(mFaces, null);        // use arraycopy instead?
18.  Arrays.fill(eyesMidPts, null);        // use arraycopy instead?
19.  mFaceDetector.findFaces(mWorkBitmap, mFaces);
20.  Log.d(TAG, ""+ mFaces.length);
21.  for (int i = 0; i < mFaces.length; i++)
22.  {
23.      face = mFaces[i];
24.       try {
25.           PointF eyesMP = new PointF();
26.           face.getMidPoint(eyesMP);
27.           eyesDistance[i] = face.eyesDistance();
28.           eyesMidPts[i] = eyesMP;
29.           Log.i("Face",
30.               i +  " " + face.confidence() + " " + face.eyesDistance() + " "
31.               + "Pose: ("+ face.pose(FaceDetector.Face.EULER_X) + ","
32.               + face.pose(FaceDetector.Face.EULER_Y) + ","
33.               + face.pose(FaceDetector.Face.EULER_Z) + ")"
34.               + "Eyes Midpoint: ("+eyesMidPts[i].x + "," + eyesMidPts[i].y +")"
35.               );
36.       }
37.       catch (Exception e)
38.       {
39.               if (true) Log.e("Face", i + " is null");
40.       }
41.  }
42.     invalidate(); // use a dirty Rect?
43.     // Requeue the buffer so we get called again
44.     mCamera.addCallbackBuffer(data);
45.  }



I posted my Google Glass app on my GitHub: 

Currently I think the code is not compatible with the new release XE12 but yes with XE11.
I'm gonna modified the code after having updated my Glass in XE12.

Thursday, September 12, 2013

Siriproxy - XFinity Remote Plugin

Hi everybody,

Just for fun!! I just created a plugin for Siriproxy to control your XFinity TV. If you can change channels with the XFinity Remote TV App : XFinity App on ITunes, you can use my plugin. Cool!

I discovered that the application use web services to change channels. With a little bit of reverse engineering, I able to create this plugin.

How it's work

  1. Log in to XFinity Web Server
  2. GET Profil Informations 
    1. Profil Token
    2. Device Key
  3. GET a token to change channels
  4. POST the channel

Install XFinityRemote plugin

First of all, you need to install Siriproxy on Linux, MAC OS, Windows or Raspberry Pi.
If it's already done, just follow the Siriproxy's tutorial on this website : https://github.com/plamoni/SiriProxy

Add the plugin

After that install my plugin it's available on my GitHub repository : https://github.com/fablanglet/SiriProxy-XFinityRemote


To configure XFinityRemote plugin, it's very simple.You just need to add your Comcast Login/Password. It's required to connect to the web server.
  1. Login
  2. Password

In the config.xml file, available in ~/.siriproxy/ folder, add this configuration :

  - name: 'XFinityRemote'
    git: 'github.com/fablanglet/SiriProxy-XFinityRemote.git'
    login: 'XfinityLogin'
    password: 'XFinityPassword'
 Don't forget to launch this command :  rvmsudo siriproxy bundle 

How to use

With my XfinityRemote plugin, you can change channels with the channel number or with the channel name. It's available for Siri in English and in French :) 
 Just say to Siri  : 'Channel number [Number]' or 'Channel [Name]' 

Demo

Wednesday, September 11, 2013

IOS7 - Safari User-Agent

The IOS7 Gold Master version is out yesterday, after the keynote. Just for you know, the user-agent of safari on this version is :

Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53

Provided by IPhone 4S, IOS7 GM

Wednesday, September 4, 2013

SiriProxy - XFinityRemote

Just a trailer, I'm creating a siriproxy plugin able to change channel of your XFinity TV.
Watch my video :


Soon i post an article where i explain how you can get and install my siriproxy plugin. To be continued...