I want android.media.MediaRecorder. to record audio not into file, but into same variable, for example char[ ] or byte[ ] or some other datta buffer structure. I want to send it to the remote server via Wi-Fi, can android.media.MediaRecorder provide this functionality?
I want android.media.MediaRecorder. to record audio not into file, but into same variable, for
Share
What you can do here is utilize the ParcelFileDescriptor class.
and now you have a buffer full of audio data
alternatively, you may want to write data directly to a socket from the recorder. this can also be achieved with the ParcelFileDescriptor class.
now any time your media recorder has data to write it will automatically write it over the socket