O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Peno sensor

android sensor tutorial for peno15/16 students

Audiolivros relacionados

Gratuito durante 30 dias do Scribd

Ver tudo
  • Seja o primeiro a comentar

Peno sensor

  1. 1. Android Sensor Framework Yucheng Jin, Sven Charleer, Robin De Croon Joris Klerkx Augment Human @ HCI 7 October 2015
  2. 2. Sensors Hardware devices that measure the physical environment. • Motion sensors accelerometers, gravity sensors, gyroscopes, etc. • Environmental sensors barometers, photometers, and thermometers. • Position sensors GPS, orientation sensors and magnetometers.
  3. 3. Sensor Framework Access sensors and and acquire raw sensor data. Android Sensor Framework includes three classes and one interface. • SensorManager • Sensor • SensorEvent • SensorEventListener http://developer.android.com/guide/topics/sensors/sensors_overview.html • Identifying sensors and sensor capabilities • Monitor sensor events
  4. 4. SensorManager • Methods Access the device's sensors mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE); mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); Registering and unregistering sensor event listeners mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_NORMAL); mSensorManager.unregisterListener(this); • Constants Sensor accuracy, Set data acquisition rates Calibrate sensors http://developer.android.com/reference/android/hardware/SensorManager.html
  5. 5. Sensor Create an specific sensor object. • Methods Check a sensor's capabilities. e.g. getStringType () • Constants …… http://developer.android.com/reference/android/hardware/Sensor.html
  6. 6. SensorEvent This class represents a sensor event and holds information such as the sensor's type, the time-stamp, accuracy and sensor's data. • Methods event.sensor.getType() event.values[] • Constants …… http://developer.android.com/reference/android/hardware/SensorEvent.html
  7. 7. SensorEventListener Receiving notifications from the SensorManager when sensor values have changed. such as the sensor's type, the time-stamp, accuracy and sensor's data. • Methods http://developer.android.com/reference/android/hardware/SensorEventListener.html
  8. 8. Practice Modify the app and show the actual values of listed sensors on your device. http://www.tutorialspoint.com/android/android_sensors.htm http://developer.android.com/guide/topics/sensors/sensors_overview. html
  9. 9. Thanks & Questions?

    Seja o primeiro a comentar

    Entre para ver os comentários

  • hsuanyeelee

    Mar. 31, 2017

android sensor tutorial for peno15/16 students

Vistos

Vistos totais

346

No Slideshare

0

De incorporações

0

Número de incorporações

3

Ações

Baixados

10

Compartilhados

0

Comentários

0

Curtir

1

×