How to fetch incoming call number using CallScreeningService api

53 views Asked by At

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?

1

There are 1 answers

0
Wang Peiming On

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.