Sensor Data Logger is a sensor data logging application for Android that will gather measurements from all available sensors while recording video or taking time lapse pictures.
Data will be stored on the SD card under the "SmartphoneLoggerData" directory.
Source code available here:
http://code.google.com/p/cellbots/source/browse/trunk/android/java/dataLogger/