There is a link to the online radio http://variant.fm:8000/LOVE-32 . The application implemented playing this audio stream using exoplayer . I press the playlist - the playback starts, and when I press the stop, it stops. This is all good.
I want to make two more buttons "Record" and "Stop". Clicking on the recording should begin recording in the file of this stream, and when you click on the stop recording ends.
For example, a stream is played and a recording is clicked: an mp3 file was created on the phone in some folder, and until a stop was pressed, a stream is recorded in this file, and when the stop is clicked, the recording stops, and we have the final mp3 file.
How to implement this? Tell me, please, what articles to read, what examples to see? In many applications, online radio in the playmarket has implemented this, and I want to implement the same functionality in my application.