How to detect Incoming call in background
You have a mistake in your manifest. The following line refers wrongly to the activity:
<receiver android:name="com.app.callrecord.MainActivity">
It should refer to the receiver:
<receiver android:name="SOME_PACKAGE_HERE.MyBroadcastReceiver">
Edit:
If the broadcast receiver doesn't get called, you probably don't have permissions to detect the incoming and outgoing phone calls. You need android.permission.READ_PHONE_STATE
and android.permission.PROCESS_OUTGOING_CALLS
permissions in your manifest.
How to detect incoming call phone number in Android when app is killed?
Not exactly an answer, but you can create your custom calling app and then make it default by asking for permission. A demo app can be found on this repository. Look at this app code and you might get it.
Related Topics
Objc_Sync_Enter/Objc_Sync_Exit Not Working with Dispatch_Queue_Priority_Low
Show Uipickerview Text Field Is Selected, Then Hide After Selected
Uiwebview Random Crash at [Uiviewanimationstate Release]: Message Sent to Deallocated Instance
How to Use Avsamplebufferdisplaylayer in iOS 8 for Rtp H264 Streams with Gstreamer
Get Selected Index of Uitableview
"Interfaceorientation" Is Deprecated in iOS 8, How to Change This Method Objective C
Tableview Reloaddata VS. Beginupdates & Endupdates
Can't Prevent 'Touchmove' from Scrolling Window on iOS
Nstimer - How to Delay in Swift
Get iOS Itunes App Store Id of an App Itself
How to Check If a Uialertcontroller Is Already Presenting
Swiftui: Unwanted Split View on iPad
How to Define the Size of a Collectionview on Rotate
Does Firebase Cloud Messaging Support Voip Pushkit Services
iOS Keychain Services: Only Specific Values Allowed for Ksecattrgeneric Key