Created
August 25, 2013 13:47
-
-
Save msama/6333923 to your computer and use it in GitHub Desktop.
Accelerometer on Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE); | |
accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); | |
sensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_NORMAL); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment