1

So I'm creating a project on an Android Galaxy Tab 10.1 that uses its accelerometers and gyroscopes. One of the steps here is to collect alot of data and determine its accuracy and drift. To do this I need to move the device and allow the sensors to get their readings, and then take those readings and put them through some analysis.

My admittedly primitive way of doing this is to send each reading as an error to the log, copy the log from Eclipse, paste it in notepad, and format it, getting rid of other unwanted errors and timestamps. This method is not very good, and the log in Eclipse deletes the old log entries if the list gets too long, meaning I can only look at about 30 seconds of data.

I need much more time than this so I thought of a couple ways to fix the issue:

  1. If I could somehow write the readings directly from the Android to a document on the computer im using, that would solve all my problems.
  2. If i could write the readings to a file on the Android that could be saved and later transfered to the computer, that would also work
tshepang
  • 12,111
  • 21
  • 91
  • 136
Ramboslice
  • 60
  • 5
  • That depends of your infrastructure? Do you have a server? – Jeremy D Jan 19 '12 at 19:19
  • What about broadcast your different values as a service in Android? And make the computer listens to the same port? – Jeremy D Jan 25 '12 at 18:43
  • Uh, could you give me some pointers on how to do that? – Ramboslice Jan 25 '12 at 18:56
  • I used something similar for an old project. It was developing modules in Java to send and receive data by using broadcast on the network. I used this Java code as an external library in my android project, and called functions of this 'library' in some services launched in a background of my android application. – Jeremy D Jan 25 '12 at 19:06
  • You could throw a look at that : http://code.google.com/p/boxeeremote/wiki/AndroidUDP – Jeremy D Jan 25 '12 at 19:08

1 Answers1

1

Writing a file to the internal SD card is quite easy and would probably solve your second point. You can access the file later via USB, which just mounts the internal SD card like an USB thumb drive.

For example, this question and answer gives you some starting points.

Community
  • 1
  • 1
dermatthias
  • 1,180
  • 10
  • 23
  • Thanks, but the tablet I am working with does not have an SD card. Is it possible to use the same method but write on the memory of the actual device? – Ramboslice Jan 25 '12 at 18:18
  • Every Android has an "External Memory", which is often an SD card, but sometimes just embeded inside the device. So yes, use this same method and just think of the external memory embeded inside the device instead of the mentioned "sd card". – dermatthias Jan 27 '12 at 08:03