Android Call Recording Incoming voice not getting recorded it is not working
up vote
-1
down vote
favorite
I have used different MediaRecorder according to device, but it's not working.
mRecorder.setAudioSource(audioSource);
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
mRecorder.setOutputFile(savePath);
mRecorder.setMaxDuration(60 * 60 * 1000);
mRecorder.setOutputFile(savePath);
AudioManager audiomanager =
(AudioManager)ctx.getSystemService(AUDIO_SERVICE);
audiomanager.setMode(2);
audiomanager.setMode(AudioManager.MODE_IN_CALL);
audiomanager.setStreamVolume(AudioManager.STREAM_VOICE_CALL,
audiomanager.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL), 0);
audiomanager.setMode(AudioManager.MODE_NORMAL);
try {
mRecorder.prepare();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
Log.d("ERROR ","IllegalStateException");
} catch (Exception e) {
// TODO Auto-generated catch block
Log.d("ERROR ","IOException");
e.printStackTrace();
}
try {
mRecorder.start();
} catch (Exception e) {
}
isRecording = true;
|
show 3 more comments
up vote
-1
down vote
favorite
I have used different MediaRecorder according to device, but it's not working.
mRecorder.setAudioSource(audioSource);
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
mRecorder.setOutputFile(savePath);
mRecorder.setMaxDuration(60 * 60 * 1000);
mRecorder.setOutputFile(savePath);
AudioManager audiomanager =
(AudioManager)ctx.getSystemService(AUDIO_SERVICE);
audiomanager.setMode(2);
audiomanager.setMode(AudioManager.MODE_IN_CALL);
audiomanager.setStreamVolume(AudioManager.STREAM_VOICE_CALL,
audiomanager.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL), 0);
audiomanager.setMode(AudioManager.MODE_NORMAL);
try {
mRecorder.prepare();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
Log.d("ERROR ","IllegalStateException");
} catch (Exception e) {
// TODO Auto-generated catch block
Log.d("ERROR ","IOException");
e.printStackTrace();
}
try {
mRecorder.start();
} catch (Exception e) {
}
isRecording = true;
1
what exactly you have tried, and what exactly was not working?
– Vladyslav Matviienko
Nov 20 at 10:38
i just try record audio call. it working but problem is incoming voice is not recorded in audio
– Mayur Rokade
Nov 20 at 10:43
1
what isaudioSourcehere, where you get it?
– Vladyslav Matviienko
Nov 20 at 10:44
MediaRecorder.AudioSource using different AudioSource For different devices
– Mayur Rokade
Nov 20 at 10:47
what happens when you just leave it in IN_CALL mode?
– Shark
Nov 20 at 10:51
|
show 3 more comments
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I have used different MediaRecorder according to device, but it's not working.
mRecorder.setAudioSource(audioSource);
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
mRecorder.setOutputFile(savePath);
mRecorder.setMaxDuration(60 * 60 * 1000);
mRecorder.setOutputFile(savePath);
AudioManager audiomanager =
(AudioManager)ctx.getSystemService(AUDIO_SERVICE);
audiomanager.setMode(2);
audiomanager.setMode(AudioManager.MODE_IN_CALL);
audiomanager.setStreamVolume(AudioManager.STREAM_VOICE_CALL,
audiomanager.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL), 0);
audiomanager.setMode(AudioManager.MODE_NORMAL);
try {
mRecorder.prepare();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
Log.d("ERROR ","IllegalStateException");
} catch (Exception e) {
// TODO Auto-generated catch block
Log.d("ERROR ","IOException");
e.printStackTrace();
}
try {
mRecorder.start();
} catch (Exception e) {
}
isRecording = true;
I have used different MediaRecorder according to device, but it's not working.
mRecorder.setAudioSource(audioSource);
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
mRecorder.setOutputFile(savePath);
mRecorder.setMaxDuration(60 * 60 * 1000);
mRecorder.setOutputFile(savePath);
AudioManager audiomanager =
(AudioManager)ctx.getSystemService(AUDIO_SERVICE);
audiomanager.setMode(2);
audiomanager.setMode(AudioManager.MODE_IN_CALL);
audiomanager.setStreamVolume(AudioManager.STREAM_VOICE_CALL,
audiomanager.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL), 0);
audiomanager.setMode(AudioManager.MODE_NORMAL);
try {
mRecorder.prepare();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
Log.d("ERROR ","IllegalStateException");
} catch (Exception e) {
// TODO Auto-generated catch block
Log.d("ERROR ","IOException");
e.printStackTrace();
}
try {
mRecorder.start();
} catch (Exception e) {
}
isRecording = true;
edited Nov 20 at 11:21
Zoe
10.8k73675
10.8k73675
asked Nov 20 at 10:35
Mayur Rokade
11
11
1
what exactly you have tried, and what exactly was not working?
– Vladyslav Matviienko
Nov 20 at 10:38
i just try record audio call. it working but problem is incoming voice is not recorded in audio
– Mayur Rokade
Nov 20 at 10:43
1
what isaudioSourcehere, where you get it?
– Vladyslav Matviienko
Nov 20 at 10:44
MediaRecorder.AudioSource using different AudioSource For different devices
– Mayur Rokade
Nov 20 at 10:47
what happens when you just leave it in IN_CALL mode?
– Shark
Nov 20 at 10:51
|
show 3 more comments
1
what exactly you have tried, and what exactly was not working?
– Vladyslav Matviienko
Nov 20 at 10:38
i just try record audio call. it working but problem is incoming voice is not recorded in audio
– Mayur Rokade
Nov 20 at 10:43
1
what isaudioSourcehere, where you get it?
– Vladyslav Matviienko
Nov 20 at 10:44
MediaRecorder.AudioSource using different AudioSource For different devices
– Mayur Rokade
Nov 20 at 10:47
what happens when you just leave it in IN_CALL mode?
– Shark
Nov 20 at 10:51
1
1
what exactly you have tried, and what exactly was not working?
– Vladyslav Matviienko
Nov 20 at 10:38
what exactly you have tried, and what exactly was not working?
– Vladyslav Matviienko
Nov 20 at 10:38
i just try record audio call. it working but problem is incoming voice is not recorded in audio
– Mayur Rokade
Nov 20 at 10:43
i just try record audio call. it working but problem is incoming voice is not recorded in audio
– Mayur Rokade
Nov 20 at 10:43
1
1
what is
audioSource here, where you get it?– Vladyslav Matviienko
Nov 20 at 10:44
what is
audioSource here, where you get it?– Vladyslav Matviienko
Nov 20 at 10:44
MediaRecorder.AudioSource using different AudioSource For different devices
– Mayur Rokade
Nov 20 at 10:47
MediaRecorder.AudioSource using different AudioSource For different devices
– Mayur Rokade
Nov 20 at 10:47
what happens when you just leave it in IN_CALL mode?
– Shark
Nov 20 at 10:51
what happens when you just leave it in IN_CALL mode?
– Shark
Nov 20 at 10:51
|
show 3 more comments
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53391096%2fandroid-call-recording-incoming-voice-not-getting-recorded-it-is-not-working%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53391096%2fandroid-call-recording-incoming-voice-not-getting-recorded-it-is-not-working%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
what exactly you have tried, and what exactly was not working?
– Vladyslav Matviienko
Nov 20 at 10:38
i just try record audio call. it working but problem is incoming voice is not recorded in audio
– Mayur Rokade
Nov 20 at 10:43
1
what is
audioSourcehere, where you get it?– Vladyslav Matviienko
Nov 20 at 10:44
MediaRecorder.AudioSource using different AudioSource For different devices
– Mayur Rokade
Nov 20 at 10:47
what happens when you just leave it in IN_CALL mode?
– Shark
Nov 20 at 10:51