Search code examples
androidservicebackground-processwear-osandroid-sensors

Can I analyze sensor data with Android Wear in background?


for a experimental application I need to analyze accelerometer data of a smartwatch nearly all the time (I know that this will drain battery). On standard Android would create a Service and a WakeLock to collect and process the data. Is this also possible with Android Wear?


Solution

  • To answer my question: Yes it's possible like on a handheld-device. Just create a service that can run in the background and hold a wake-lock. You might also consider using sensor batching to save some battery power when using Android 4.4 or higher.