Michał Staruch
Cinkciarz.pl
JUG Zielona Góra
listopad 2014
GDK - Android SDK z dodatkami dla Glass:
Mirror API - REST w chmurze Google:
<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/find_the_exchange_rate" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
na Glass nie ma launchera
intent-filter z manifestu dla Androida
intent-filter i meta-data z manifestu dla Glass
niewielkie zmiany w stylach...
... i przepisanie aplikacji
SensorManager.getRotationMatrixFromVector(mRotationMatrix, mSensorValues); SensorManager.remapCoordinateSystem(mRotationMatrix, SensorManager.AXIS_X, SensorManager.AXIS_Z, mRotationMatrix); SensorManager.getOrientation(mRotationMatrix, mOrientation); final float yaw = mOrientation[0]; final float pitch = mOrientation[1];
public int getValue(final float in, final int currentOut) {
final float lowLimit = currentOut * mStepSize - mInputMargin;
final float highLimit = (currentOut + 1) * mStepSize + mInputMargin;
if (in <= lowLimit) {
return getValue(in, currentOut - 1);
} else if (in >= highLimit) {
return getValue(in, currentOut + 1);
} else {
return currentOut;
}
}