How to record data

I want to use the obdepth sound code to record the depth data in Android. Can you tell me how to do it?

You may use the NiViewer, it can record data in .oni format. Or you may write an application for android based on source code of NiViewer and write byte array into the file.