问题标签 [android-phone-call]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
180 浏览

android - How to get a callback from Android system to the app?

I'm making an app in which you can chat and call with other contacts. But in case of calling, I've designed the app in such a way that after typing the number and clicking on the call icon, it takes you to native calls app for calling and updates the call log in my current app.

For this process, this is the code I've written:

You can see that I'm putting mobile number into the intent and starting it. And I'm using addToUserCallLogs() function to show it in my app's call logs.

This works fine usually, but in the issue is in the following case. When the user has multiple calling applications(For eg, the user has installed application named SMARTalk. Now he has native caller app and SMARTalk app to call from), in that case the Android system gives options to chose from like this: Screenshot of that scenario

Now, if he choses from one of them, even in that case there is no issue. Say he didn't chose any of those and clicked on the other part of the screen. Then this options bar will be closed. Since all this is happening after starting the intent, this call will be added in the call logs of the app from the function addToUserCallLogs(). But I don't want the call to be shown in the call Logs because I haven't done any call.

But according to the code I've written, before starting the intent, I'm adding into my app's call logs database. Is there a way the information of whether the call has happened or not can be sent back from the system to the app?

Or a way to get these options to be shown manually from the app?

Please comment if you need any more explanation.

0 投票
1 回答
90 浏览

java - 调用AlertDialog的dismiss方法没有发生任何事情

基本上我有 2 个类,“ShowAlert”和“CallReceiver”,警报创建没有任何问题,但是当我尝试调用方法“alertDisplay.dismissAlert();”时 它只是没有发生任何事情,警报仍然存在并且控制台没有显示任何错误,在互联网上搜索了几天不是答案,我在互联网上没有找到任何有用的东西来解决我的问题

这些是课程,感谢您的帮助

CallReceiver.java

ShowAlert.java

显现

0 投票
1 回答
72 浏览

android - 如何在 setOnItemLongClickListener 中实现联系人呼叫按钮?

我想在我的应用程序中实现一个呼叫号码按钮,我该怎么做?

我是 Android 新手,如何在 setOnItemLongClickListener() 中进行联系电话。从顶部我将 setOnItemLongClickListener 方法添加到如何使用它来实现。

0 投票
0 回答
51 浏览

android - 使用 InCallService 方法而不替换默认电话应用程序

我正在开发一个在通话期间启用扬声器的 Android 应用程序。

从 Android 10 开始,AudioManager#setSpeakerphoneOn(boolean) 不再工作,鼓励开发人员使用 InCallService#setAudioRoute(int)。

我的问题是,如何在不替换默认拨号程序的情况下使用(如果可能)InCallService 的方法(并实现很多我不会使用的东西......)?

谢谢

0 投票
0 回答
52 浏览

android - 当应用程序在后台时显示带有特定图标布局的来电/正在进行的呼叫通知

我正在开发一个默认拨号器替换应用程序。当应用程序进入后台时,需要在状态栏中显示自定义图标。它看起来像我在下面附加的示例。需要带有背景颜色、动画图标和时间。
甚至可能吗?检查了通知 API,但可以找到可能有帮助的东西。常规通知图标(甚至是动画图标)对于我的情况来说是不够的。我附上了一个来自小米(MIUI)默认拨号器的例子。(另外,我在三星设备上看到的类似图标。)

小米示例

0 投票
2 回答
63 浏览

android - 反应本机即时电话不起作用

我正在编写使用的应用程序,react-native-immediate-phone-call通过按下 Pressable 组件,我需要从该模块调用函数。

控制台日志使用 Metro Bunler 显示在终端中,但返回不会以某种方式执行。我是 js 的新手并做出反应。函数和函数调用应该如何?

0 投票
0 回答
33 浏览

android - Android - 从来电中获取电话号码 - Playstore 应用被拒绝

在我的应用程序中,我实现了一个从来电中获取电话号码的功能,它以前工作正常。但是在 android 9 之后我们需要在 manifest 文件中添加权限读取调用日志。

但是在添加这些之后,由于在清单文件中添加了这个(READ_CALL_LOG)权限,应用程序被拒绝了。Playstore 通知将这些功能作为应用程序的核心,然后只有他们会接受它。但这个功能不是核心功能,它是我的应用程序的一部分。

任何人都可以对此有任何想法以及如何进一步进行吗?

0 投票
1 回答
61 浏览

android - 为什么 ACTION_CALL 在 Android 11 上不起作用

为什么我运行这段代码时会出现这句话( to place a call enter a valid number )?

但是,如果您将数字从“#1234#”更改为“123456789”,它可以正常工作 为什么不接受 ( # ) 符号?

知道我加了

在 AndroidManifest.xml 中

注意:它仍然适用于低于Android 11的版本,并且可以毫无问题地接受 ( # ) 符号。

0 投票
0 回答
14 浏览

android - ANDROID 8 及更高版本 - 以编程方式接受/拒绝来自应用程序的语音呼叫?

我们能否以编程方式接受/拒绝/保持/恢复/切换语音通话,而不将应用程序设置为手机的默认电话应用程序? https://developer.android.com/reference/kotlin/android/telecom/InCallService建议制作默认手机应用。

多年来有很多这样的问题被问到,但由于 Android 实现的频繁变化,没有明确或可靠的答案。Android 文档也没有多大帮助。

任何链接/建议将不胜感激。

0 投票
0 回答
12 浏览

android - Android 核心“电话应用”自定义,如更改键盘按钮功能?

我需要更改一些 Android 核心电话应用程序的功能,例如,如果我长按启用语音邮件的键 1,它会向某个号码发送一些消息。所以,

有什么可能或必须制作我们自己的应用程序才能做到这一点?