mInStream = mStreamConnection.openInputStream();
mGlassReaderThread = new GlassReaderThread();
mGlassReaderThread.start();
// handshaking
Envelope envelope = CompanionMessagingUtil.newEnvelope();
envelope.timezoneC2G = TimeZone.getDefault().getID();
write(envelope);
try {
Thread.sleep(300);
} catch (InterruptedException e) {
e.printStackTrace();
}
// handshaking
Envelope envelope2 = CompanionMessagingUtil.newEnvelope();
GlassInfoRequest glassInfoRequest = new GlassInfoRequest();
glassInfoRequest.requestBatteryLevel = true;
glassInfoRequest.requestStorageInfo = true;
glassInfoRequest.requestDeviceName = true;
glassInfoRequest.requestSoftwareVersion = true;