Can a third-party app implement CallScreeningService in android 7?

喜夏-厌秋 提交于 2019-12-05 03:57:01

As of Android 10 (API 29+), you can have a CallScreeningService without the requirement of also implementing an entire dialer app. Until Android 10, only the default dialer app's call CallScreeningService would be invoked.

https://developer.android.com/about/versions/10/features#call-screening

Don't get too excited though, because it's very buggy and does not work as the documentation says it does:

My workaround for getting called for known contacts was to ask the user for contact access and check if the incoming caller was in the user's contacts. There is no workaround for the other issues at the moment.

I made a very basic screening app that declines all calls from numbers not in the user's contacts you can use an an example if you like: https://github.com/joshfriend/gofccyourself

Looking at the docs you linked to:

This service can be implemented by the default dialer (see getDefaultDialerPackage()) to allow or disallow incoming calls before they are shown to a user.

Don't think you can do this in a separate app (at least with the current interface: I'd expect in the not too distant feature it will be exposed).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!