Record audio in AMR format and send to LocalSocket in Android
I want to record the audio in AMR format and send the bytes to LocalSocket. If I do the recording with MediaRecorder then there is method which allows me to write to file but not to O开发者_运维问答utputStream of LocalSocket.
Is there anyone who can help me out with this?
Are you sure ? There is a
public void setOutputFile (FileDescriptor fd)
method on MediaRecorder. And you may get the FileDescriptor of your LocalSocket through the
public FileDescriptor getFileDescriptor()
method of LocalSocket.
see spydroid code, that have exaclty what you need
精彩评论