telephony

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);

Can the Android API be leveraged to modify the caller's voice during the call?

左心房为你撑大大i 提交于 2019-12-02 01:39:30
问题 I can't seem to find any documentation saying this is possible, but Google turned up a few apps that claim to be able to accomplish it. I'd like to, ideally, be able to play an audio track and have it sent as the caller's voice. 回答1: You cannot modify the in-call audio stream, sorry. 来源: https://stackoverflow.com/questions/4063402/can-the-android-api-be-leveraged-to-modify-the-callers-voice-during-the-call

How to detect a call Drop in android

混江龙づ霸主 提交于 2019-12-01 23:56:07
I'm writing an app that runs on background during a telephone conversation and logs the coordinates to a file after the conversation has end,I know Android telephony API can detect a call manual disconnect by user*(correct me,if I'm wrong)*, But what I want is to know whether the service disconnection have caused due to call drop,is there a way or an API I can use to achieve this, All what I need is to programmatically differentiate a disconnected call and a dropped call. Please help. jobin Try this code, but I am not sure.. private getCallFailedString(Call call) { Phone phone = PhoneApp

Can the Android API be leveraged to modify the caller's voice during the call?

倾然丶 夕夏残阳落幕 提交于 2019-12-01 23:04:25
I can't seem to find any documentation saying this is possible, but Google turned up a few apps that claim to be able to accomplish it. I'd like to, ideally, be able to play an audio track and have it sent as the caller's voice. You cannot modify the in-call audio stream, sorry. 来源: https://stackoverflow.com/questions/4063402/can-the-android-api-be-leveraged-to-modify-the-callers-voice-during-the-call

iOS check if cellular technology available even if the device is on WiFi

女生的网名这么多〃 提交于 2019-12-01 22:15:50
问题 Need some help here. I need to detect if an iOS device have (on a certain moment) cellular capabilities (No matter which one). I tried to use reachability class, but the problem start when the user is connected to WiFi, because if so - reachability can't detect cellular I also tried to use this code: CTTelephonyNetworkInfo *telephonyInfo = [CTTelephonyNetworkInfo new]; NSLog(@"Current Radio Access Technology: %@", telephonyInfo.currentRadioAccessTechnology); [NSNotificationCenter

Broadcastreceiver to obtain ServiceState information

血红的双手。 提交于 2019-12-01 18:46:48
Does anyone know of a way to obtain the phone service state (IN_SERVICE, OUT_OF_SERVICE, EMERGENCY_ONLY, POWER_OFF) in android. I was hoping there would be a broadcastreciever to identify the changes, but I can't find anything. I know there's a listener but I'm not sure how I would use that from my app as it runs as a service using a WakefulIntentService (by thecommonsguy). With something like battery level (ie BATTERY_LOW, BATTERY_OKAY) it's quite easy, but I just can't work out a similar things for phone service changes. Register a receiver for public static final String ACTION_SERVICE_STATE

RaspberryPI: Making SIP outbound calls using linphonec or an alternative SIP soft phone

ε祈祈猫儿з 提交于 2019-12-01 00:37:40
In my project I want my Raspberry PI to dial an outbound PSTN number. I have a SIP account with an assigned regular phone number and I can make the mentioned outbound calls on OSX using Telephone.app : Now I tried to achieve the same on my raspberry PI using linphonec First I register my SIP Provider with linphone with seems to succeed: $ sudo apt-get install linphone $ linphonec linphonec> register sip:4100000004@free4.voipgateway.org free4.voipgateway.org <PASSWORD> Registration on sip:free4.voipgateway.org successful. Then I attempt to call 004100000018 with results in an error. linphonec>

Android - remove missed call notification

故事扮演 提交于 2019-11-30 23:48:17
is there anyway to remove a missed call notification by code? And somehow remove the last missed call from call history? yes, it is possible.Try this: Uri UriCalls = Uri.parse("content://call_log/calls"); Cursor cursor = getApplicationContext().getContentResolver().query(UriCalls, null, null, null, null); Reading call log entries... if(cursor.getCount() > 0){ cursor.moveToFirst(); while(!cursor.isAfterLast()){ String number = cursor.getString(cursor.getColumnIndex(CallLog.Calls.NUMBER)); // for number String name = cursor.getString(cursor.getColumnIndex(CallLog.Calls.CACHED_NAME));// for name

How to properly use reflection to access hidden methods in Telephony Manager

安稳与你 提交于 2019-11-30 16:28:21
I'm not sure if I'm having trouble with Reflection itself, or the method I'm trying to obtain. What I'd like to do is call the function setLine1Number from the class: com.android.internal.telephony.gsm.GSMPhone So that I can have my number properly inserted into my phone as it is not required to be in my SIM. Therefore I want to be able to call the function getLine1Number and have it return the same number that I set. Reflection appears the only way to be able to use this function as it is not in the public API. I've written this, but keep getting an illegal argument exception. Here is my code

What does the different Call states in the Android telephony stack represent?

本秂侑毒 提交于 2019-11-30 13:40:16
The internal Android class com.android.internal.telephony.Call contains an enum called State and defined as follows: public enum State { IDLE, ACTIVE, HOLDING, DIALING, ALERTING, INCOMING, WAITING, DISCONNECTED, DISCONNECTING; public boolean isAlive() { return !(this == IDLE || this == DISCONNECTED || this == DISCONNECTING); } public boolean isRinging() { return this == INCOMING || this == WAITING; } public boolean isDialing() { return this == DIALING || this == ALERTING; } } What does the different states represent? Okay, this is my own attempt at answering the question: /** Call is idle. */