+ All Categories
Home > Education > Android Sensor and Framework - AWARE

Android Sensor and Framework - AWARE

Date post: 13-Apr-2017
Category:
Upload: yucheng-jin
View: 504 times
Download: 1 times
Share this document with a friend
15
Android Sensor and Framework - AWARE Yucheng Jin, Sven Charleer, Robin De Croon Joris Klerkx Augment Human @ HCI 7 October 2015
Transcript
Page 1: Android Sensor and  Framework - AWARE

Android Sensor and Framework - AWARE

Yucheng Jin, Sven Charleer, Robin De CroonJoris Klerkx

Augment Human @ HCI 7 October 2015

Page 2: Android Sensor and  Framework - AWARE

SensorsHardware devices that measure the physical environment.

• Motion sensorsaccelerometers, gravity sensors, gyroscopes, etc.• Environmental sensorsbarometers, photometers, and thermometers.• Position sensorsGPS, orientation sensors and magnetometers.

Page 3: Android Sensor and  Framework - AWARE

Sensor FrameworkAccess sensors and and acquire raw sensor data.

Android Sensor Framework includes 3 abstract class 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

Page 4: Android Sensor and  Framework - AWARE

Sensor Framework - AWAREAWARE is an Android instrumentation framework for logging, sharing and reusing mobile context.

http://www.awareframework.com/

Page 5: Android Sensor and  Framework - AWARE

Overview of AWARE infrastructure

Ferreira, D., Kostakos, V., & Dey, A. K. (2015). AWARE: mobile context instrumentation framework. Frontiers in ICT, 2, 6.

Page 6: Android Sensor and  Framework - AWARE

Overview of AWARE client’s interfaces

Ferreira, D., Kostakos, V., & Dey, A. K. (2015). AWARE: mobile context instrumentation framework. Frontiers in ICT, 2, 6.

Page 7: Android Sensor and  Framework - AWARE

How to use AWARE in your app?• Create a AWARE pluginIt runs on top of the AWARE app, AWARE need to be installed beforehand.(template)http://www.awareframework.com/creating-a-new-aware-plugin/

• Creating a standalone applicationIt uses AWARE as a built-in library and leverages AWARE’s sensors’ and plugins’ APIs.

Page 8: Android Sensor and  Framework - AWARE

Creating a standalone application1. Adding AWARE as a

library to your project.

2. Overriding AWARE’s resources with your application’s resources.

3. Include AWARE’s ContentProviders inside your application.

4. Include AWARE’s plugins inside your application.(if need)

http://www.awareframework.com/creating-a-standalone-application/

Page 9: Android Sensor and  Framework - AWARE

Saving sensor data• Saving context data into a ContentProviderContentProvider can manage databases such as SQLite.

Sync data

Save data

http://www.awareframework.com/creating-a-context-provider/

class Plugin, onCreate()

Page 10: Android Sensor and  Framework - AWARE

Reading sensor dataTwo ways of reading data• Passive contextAccessing the data from the database when you need it• Active context- Listening to data changes- Listening to new values

http://www.awareframework.com/how-do-i-read-data/#read1

Page 11: Android Sensor and  Framework - AWARE

Passive contextAccessing the data from the database.

http://www.awareframework.com/how-do-i-read-data/#read1

Page 12: Android Sensor and  Framework - AWARE

Active contextReading new data from the database when it gets inserted

http://www.awareframework.com/how-do-i-read-data/#read1

In the class Plugin

Page 13: Android Sensor and  Framework - AWARE

Active contextReading the new data as it gets broadcasted by a sensor

http://www.awareframework.com/how-do-i-read-data/#read1

onCreate(), onResume()

In the class Plugin

onReceive()

Page 14: Android Sensor and  Framework - AWARE

Practice• AWAREFollow the link to create a standalone application with sensors or the plugin “Google Fused Location”http://www.awareframework.com/creating-a-standalone-application/#http://www.awareframework.com/plugin/82/ or create your own plugin http://www.awareframework.com/creating-a-new-aware-plugin/

More tutorialhttp://www.awareframework.com/category/tutorials/

• Original android sensor docModify the app and show the actual values of listed sensors on your device.http://www.tutorialspoint.com/android/android_sensors.htmhttp://developer.android.com/guide/topics/sensors/sensors_overview.html

Page 15: Android Sensor and  Framework - AWARE

Thanks & Questions?


Recommended