react-native - 在来电时触发 RNCallKeep.displayIncomingCall() 的最佳方法是什么?
问题描述
现在,我可以在单击按钮后触发 RNCallKeep.displayIncomingCall() 并显示传入屏幕。目标是每当有来电时,通过传递来电者的号码来触发 RNCallKeep.displayIncomingCall()。我尝试使用 react-native-call-detection,我得到了号码,但它没有触发 RNCallKepp.displayIncomingCall():
this.callDetector = new CallDetectorManager((event, phoneNumber)=> {
if (event === 'Incoming') {
RNCallKeep.displayIncomingCall(
'c5612146-3e43-4922-bdf2-13b0c2cb2243',
phoneNumber,
'CALLER NAME'
);
}
}
在来电时触发 RNCallKeep.displayIncomingCall() 的最佳方法是什么?
解决方案
推荐阅读
- mysql - 父子关系和大关系的 SQL 查询
- python - 如何使用 Spacy nlp 自定义 ner 一次识别 2 种类型的文档
- python - “提供的字符串似乎不是电话号码” phonenumbers 模态
- ruby - 在 Ruby 应用程序中清理 Resque 失败的作业
- javascript - 验证 .validate() 规则 jquery 函数上所需的单选按钮
- html - 垂直对齐表单中的文本
- github - 语义释放在 CircleCI 上突然失败-远程:用户名或密码无效
- echarts - Echarts - 主题中的媒体查询
- r - 使用包 move 插值数据:如何创建 movestack 对象?
- python - 如何在 __init__.py 中导入外部模块