Can I save sensor data of android wearable(MOTO 360)?

1.2k views Asked by At

I'm recently developing apps on android wearable(MOTO 360).

My question is, is it possible to save the sensor data as a file in my watch? Or I must sent those data back to my handheld to save?

I try to use File directory = Environment.getExternalStoragePublicDirectory("/groundTruth"); to save sensor data into a file in my watch. But it seems not work.

Since I need to collect real-time accelerometer data for 5-10 mins, I need to save those data in a file somewhere for future analytic in Matlab.

If any of you have some resource about android wearable sensor data collection, could you also provide me with some example code?

Thank you guys very much!

2

There are 2 answers

2
Tony Malghem On BEST ANSWER

You can write on the memory of your wearable, yes, but careful about the storage capacity. Just declare the file as you would on any other Android devices, and it should do the trick. However, you will have to work a little on the data given by the sensor, as the results are stored as arrays. Try formating a String with them, or better store them as a JSON File.

1
Michał Tajchert On

I used SharedPreferences - as in any other Android device and it worked. I don't know how much data you are looking to save but it should be enough in that case.