I have two Android devices (Phone A & Phone B) and a server with a MySQL database. I want to send an audio message using a microphone, from Phone A to Phone B, through the server.
One idea is to:
then play it with MediaPlayer
you need to capture the audio on phone A, and send it as binary data to the server. You can use a simple POST request to do so.
The server should store that to a file, not the database -- the database should only contain the filename and path, plus an id.
Phone B polls / gets push notification about the file. Server uses ID to get filename from database and uses passthru
to serve the file.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.