显示我的活动,而不是为来电标准画面 [英] Show my activity instead of standard screen for incoming call
问题描述
我正在开发针对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.
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屋!