显示我的活动,而不是为来电标准画面 [英] Show my activity instead of standard screen for incoming call

查看:110
本文介绍了显示我的活动,而不是为来电标准画面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发针对Android 2.3.3的应用程序。它包含了一些EditView中的显示信息的来电:国家,当前时间,电话号码......我知道如何获取和显示信息。我所面临的问题是,我不知道如何表达我的活动的而不是的标准为来电屏幕。

I'm developing an application for android 2.3.3. It contains a few EditView's to show an information for an incoming call: country, current time, phone number... I know how to get and show that information. The problem I faced is that I don't know how to show my activity instead of the standard screen for incoming calls.

现在它显示的来电之后的信息。

Now it shows the information after the incoming calls.

怎么办呢?

推荐答案

这是不可能的。根据<一href="https://github.com/CyanogenMod/android_packages_apps_Phone/blob/ics/src/com/android/phone/PhoneApp.java#L658"相对=nofollow> PhoneApp 的用于启动InCallScreen被绑定到phoneapp的意图,你就没有机会拦截此。因此,屏幕上会显示每一次来。

It's not possible. According to the PhoneApp the intent used to start the InCallScreen is bound to the phoneapp, you have no chance to intercept this. So the screen will be shown every time.

你可能尝试做的是由 TelephonyManager 当手机进入 CALL_STATE_RINGING 状态,然后画你的UI刚过InCallScreen。也许可以这样做,但你woudn't能够摘机通话(不确定,但我不这么认为),从你的用户界面。也状态未设置时立即InCallScreen弹出,它延迟了一些毫秒。

What you may try to do is to be notified by the TelephonyManager when the phone goes into the CALL_STATE_RINGING state and then paint your UI just over the InCallScreen. It may be possible to do so but you woudn't be able to offhook the call (unsure, but I don't think so) from your UI. Also the state is not set immediately when the InCallScreen pops up, it's delayed by some milliseconds.

这篇关于显示我的活动,而不是为来电标准画面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆