android-phone-call

Audiomanager Speaker not working

ε祈祈猫儿з 提交于 2019-12-07 11:52:56
问题 I'm trying to enable the speaker while I am in a call: final AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); audioManager.setSpeakerphoneOn(true); I tried to check after the setSpeakerphoneOn() the audiomanager and get that the speaker is still not on by asking isSpeakerphoneOn() audioManager.isSpeakerphoneOn(); In my log I can see some errors that I can't understand: E/AudioManager: Don't setBluetoothScoOn-PackageName: com.myapp.app on = false E

How to be notified when an outgoing phone call is answered?

邮差的信 提交于 2019-12-06 08:16:18
问题 Background I need to get notified when a phone call is answered and hanged. For incoming call, I use the TelephonyManager.ACTION_PHONE_STATE_CHANGED Intent with the TelephonyManager.EXTRA_STATE that comes with it. The problem For outgoing calls, you get a callback of TelephonyManager.ACTION_PHONE_STATE_CHANGED right after starting to dial, but not when the call was answered. I've searched over the Internet, and all claim it's impossible to do it. However, I've noticed that some call-recording

Audiomanager Speaker not working

这一生的挚爱 提交于 2019-12-06 03:17:57
I'm trying to enable the speaker while I am in a call: final AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); audioManager.setSpeakerphoneOn(true); I tried to check after the setSpeakerphoneOn() the audiomanager and get that the speaker is still not on by asking isSpeakerphoneOn() audioManager.isSpeakerphoneOn(); In my log I can see some errors that I can't understand: E/AudioManager: Don't setBluetoothScoOn-PackageName: com.myapp.app on = false E/AudioManager: Don't setSpeakerphoneOn-PackageName: com.myapp.app on = true I can't find anything about

How to be notified when an outgoing phone call is answered?

空扰寡人 提交于 2019-12-04 12:31:53
Background I need to get notified when a phone call is answered and hanged. For incoming call, I use the TelephonyManager.ACTION_PHONE_STATE_CHANGED Intent with the TelephonyManager.EXTRA_STATE that comes with it. The problem For outgoing calls, you get a callback of TelephonyManager.ACTION_PHONE_STATE_CHANGED right after starting to dial, but not when the call was answered. I've searched over the Internet, and all claim it's impossible to do it. However, I've noticed that some call-recording apps (such as " Boldbeast recorder ") have managed to overcome this, and somehow identify the moment

Unable to record audio of Incoming and Outgoing phone call in Android

血红的双手。 提交于 2019-12-02 16:16:32
问题 Unable to record audio of Incoming and Outgoing phone call in Android I am using Broadcastreceiver for detecting Phonecalls, It is working fine. When ever phonecall is started I am using below code for start recording Phonecall and creating a folder of "CALLLOG", in which each call record will be stored. public void startRecordingStoreFile(){ String out = new SimpleDateFormat("dd-MM-yyyy_hh-mm-ss").format(new Date()); File sampleDir = new File(Environment.getExternalStorageDirectory(), "

How to Block a call when first call is ongoing?

痞子三分冷 提交于 2019-12-02 10:47:23
I have created an application for call blocking which is working fine but it's stuck in one scenario: Scenario: When the first call is ongoing(user talking with the first caller) in between second caller call to same user & that new caller is in my Blocklist when my call blocking logic runs both calls ended immediately. In the above case, I want to end call of second caller only. How to achieve this? Is there any way to identify & block the particular call? Here is my call blocking logic: TelephonyManager telephony = (TelephonyManager) context .getSystemService(Context.TELEPHONY_SERVICE);

Media Recorder To record calls is sometime unable to Record other side voice

北战南征 提交于 2019-11-29 01:38:55
In my application there is a feature to record voice calls and it works perfectly well. But when tested on (Samsung s7, s8 ) it doesn’t work well. The application is able to record only callers voice not the voice from the other end. Below is my code to check please suggest a solution MediaRecd = new MediaRecorder(); MediaRecd.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL ); MediaRecd.setAudioChannels(ConstantVariables.audioChannels);//monoRecording MediaRecd.setAudioEncodingBitRate(64); MediaRecd.setAudioSamplingRate(44100); MediaRecd.setOutputFormat(output_formats[pos]);//.mp3

Android Recording Incoming and Outgoing Calls

百般思念 提交于 2019-11-26 19:31:24
I am trying to understand is there a way I can record calls incoming and outgoing on android phones 2.2 and above? A client wants to record calls of the agents they make to the clients so that it can be later used to fill out some material. Instead of making the client wait while on call they want to do it later on. Is this possible and what APIs do I need to use? Shane Powell First off, you have to be careful with recording calls as there are legal requirements depending on the country. Here is a blog post on how to record audio using the MediaRecorder . I haven't tried recording phone call's

Android Recording Incoming and Outgoing Calls

喜你入骨 提交于 2019-11-26 07:00:21
问题 I am trying to understand is there a way I can record calls incoming and outgoing on android phones 2.2 and above? A client wants to record calls of the agents they make to the clients so that it can be later used to fill out some material. Instead of making the client wait while on call they want to do it later on. Is this possible and what APIs do I need to use? 回答1: First off, you have to be careful with recording calls as there are legal requirements depending on the country. Here is a

How to make a phone call using intent in Android?

回眸只為那壹抹淺笑 提交于 2019-11-26 00:23:37
问题 I\'m using the following code to make a call in Android but it is giving me security exception please help. posted_by = \"111-333-222-4\"; String uri = \"tel:\" + posted_by.trim() ; Intent intent = new Intent(Intent.ACTION_CALL); intent.setData(Uri.parse(uri)); startActivity(intent); permissions <uses-permission android:name=\"android.permission.CALL_PHONE\" /> Exception 11-25 14:47:01.661: ERROR/AndroidRuntime(302): Uncaught handler: thread main exiting due to uncaught exception 11-25 14:47