outgoing-call

Running a service on Outgoing Calls in Oreo

余生颓废 提交于 2020-01-24 14:04:03
问题 I'm developing an app which needs to run some code (Open Activity) whenever an call to specific number is performed. In API 24 and lower it's fine, I register an implicit receiver in Manifest file and start my service in the specified class which extended BroadcastReceiver. In API 26 however you cannot register android.provider.Telephony.OUTGOING_CALL in a receiver since it won't work. From Android documentation: Note: If your app targets API level 26 or higher, you cannot use the manifest to

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

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