java - 如何为 Andoid<=28 实现 CallScreeningService
问题描述
**到目前为止我做了什么:**
我已经为 Android SDK 29 实现了它
RoleManager roleManager = (RoleManager) getSystemService(ROLE_SERVICE);
Intent intent = roleManager.createRequestRoleIntent(RoleManager.ROLE_CALL_SCREENING);
startActivityForResult(intent, REQUEST_ID1);
**我在找什么?: **
我想为 < SDK 29 的设备实施呼叫筛选服务。如果有人以前做过,请帮助我。
解决方案
不幸的是,你不能。
在 Android 版本 < 29 上无法访问RoleManager
该类,因为该类是在 Android 29 上引入的。因此,您只能在运行 Android 29 及更高版本的设备上使用该类。
推荐阅读
- spring - 如何在基于属性的spring自定义启动器中动态创建bean
- javascript - 没有为具有域的线图绘制对数刻度(最小值:0.97,最大值:0.99)
- python - 如何从datalab中的pandas数据框将数据批量上传到bigquery表中
- php - 为什么我的网站无法上传到我的数据库(使用 MySQLI),然后没有重定向我?
- css - 根据条件应用 css
- python - 来自数组和 np.dtype 对象的结构化数组
- outlook - Outlook 加载项 - AttachmentId 格式错误
- python - Scikit:自定义估算器:无法克隆
- pyspark - pyspark:在同一列(使用数组)上使用多个 UDF 函数时出现意外行为
- android - AutoTransition 在 Motion 布局中不起作用