I’m developing an Android Caller ID app, which uses the Call Screening Service.
In the documents Android 10 Features, it was introduced since Android 10:
Android 10 provides your app with a means to identify calls not in the user’s address book as potential spam calls, and to have spam calls silently rejected on behalf of the user
And this document Screen Calls:
Devices that run Android 10 (API level 29) or higher allow your app to identify calls from numbers that aren’t in the user’s address book as potential spam calls.
But from the document of CallScreeningService, this service is added in API Level 24, which is Android 7.
I tried to run it on Android 9, but the getSystemService(ROLE_SERVICE)
returns null.
Is it not supported on Android 9 or is there any other way to make it work?