Search in sources :

Example 1 with Landmarks

use of com.google.android.glass.sample.compass.model.Landmarks in project gdk-compass-sample by googleglass.

the class CompassService method onCreate.

@Override
public void onCreate() {
    super.onCreate();
    // Even though the text-to-speech engine is only used in response to a menu action, we
    // initialize it when the application starts so that we avoid delays that could occur
    // if we waited until it was needed to start it up.
    mSpeech = new TextToSpeech(this, new TextToSpeech.OnInitListener() {

        @Override
        public void onInit(int status) {
        // Do nothing.
        }
    });
    SensorManager sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
    LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
    mOrientationManager = new OrientationManager(sensorManager, locationManager);
    mLandmarks = new Landmarks(this);
}
Also used : LocationManager(android.location.LocationManager) SensorManager(android.hardware.SensorManager) Landmarks(com.google.android.glass.sample.compass.model.Landmarks) TextToSpeech(android.speech.tts.TextToSpeech)

Aggregations

SensorManager (android.hardware.SensorManager)1 LocationManager (android.location.LocationManager)1 TextToSpeech (android.speech.tts.TextToSpeech)1 Landmarks (com.google.android.glass.sample.compass.model.Landmarks)1