I play the music (internet radio stream) in a MediaPlayer. I would like to save the datastream (or the waveform) to a file, and play it back later. Does it have SDK support? I did not found, AudioRecorder and MediaRecorder is only good for mics and voice uplink/downlink.
So, how to save the data played by mediaplayer? And how to play it back? I need an API 8/9 to API 16 solution.
Related
I am implementing automatic call response application in android.In my application the call is respond by the audio file which is recorded by user and that file will play when incoming call is answered automatically by program.I have searched for it to know how to do this but all are saying that this is not possible in android to play audio file during call.So, I want to know what are the alternatives that can be used for doing the same thing.
According to android official docs, it is not possible to play audio while a call.
See the docs here :https://developer.android.com/guide/topics/media/mediaplayer.html
Note: You can play back the audio data only to the standard output
device. Currently, that is the mobile device speaker or a Bluetooth
headset. You cannot play sound files in the conversation audio during
a call.
As an alternative you can use Twilio : https://www.ipragmatech.com/play-audio-file-android-call-using-twilio/
In my application I am doing live audio streaming using Android media player. I want to capture the sound stream played by MediaPlayer. Is there is way to record using Android MediaPlayer instead of MediaRecorder? Any suggestions?
While it is a non-trivial undertaking, you can write your own "MediaPlayer" that implements whatever streaming protocol you are using and writes the stream to a file instead of the speaker.
I'm trying to creating radio application and one of the radio stations is using rtsp:\ protocol (rtsp:\\addres\file.sdp with mp4a codec). I was trying to play it using MediaPlayer but it doesn't want to work. Is it possible to play such audio stream using android with MediaPlayer or... other lib?
Any one :(?
Android supports for RTSP streaming. However, usually the Android Emulator have issued with playing audio or video streaming application. You should test your streaming application on real device
On Android, you can record audio from the microphone using the MediaRecorder class:
MediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
I want to record some parts of audio being played by a MediaPlayer instance instead (or some other audio playback device). Is that possible? How would I set a custom audio source?
To summarize; how do I stream audio into the MediaRecorder from an arbitrary audio source?
I don't think there is an API for that for now. Though it IS possible, you would have to have access to the device's buffer, down to the kernel/hardware level. Even if you find a way, I don't think Android would give you permission to do this on application level.
I have an app that allows you to record short voice memos. Some users aren't able to record any audio(LG Ally being one device) at all. I'm using the MediaRecorder in android and am curious if there might be a "better" standard way to handle audio recording?