I want to fetch the incoming call number in my Android app using Callscreeningservice api but I don't know how to implement it and how to use that service in activity
I created a class extending Callscreeningservice but how to register this service in my activity?
You can refer to this answer about how to use
CallScreeningService
to get incoming phone number.Just note that the
CallScreeningService
only works on Android >= 29. So if you want to get incoming number from older devices you need to add extra methods.