4

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.

How to do it?

Dan D.
  • 73,243
  • 15
  • 104
  • 123
  • @Sameer, I want to show my activity instead of the standard screen for incoming calls. –  Feb 13 '12 at 10:39

3 Answers3

1

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.

Luminger
  • 2,144
  • 15
  • 22
  • How to paint my UI over InCallScreen? –  Feb 13 '12 at 11:22
  • 1
    Good question, I have no idea how this could be done. But there are ways (there are apps which paint over everything else in the system). You should start a new questions for this particular case. Edit: [ http://developer.android.com/reference/android/Manifest.permission.html#SYSTEM_ALERT_WINDOW] may help you – Luminger Feb 13 '12 at 13:40
  • Behold the impossible! https://play.google.com/store/apps/details?id=com.androminigsm.fscifree&hl=en – Stephan Tual Apr 07 '12 at 22:44
  • Check out my proof of concept application which does exactly what you are asking about: https://github.com/inez/CustomIncomingCallScreen – Inez Feb 18 '14 at 20:27
1

Take a look at the questions about showing popups over the incoming call screen:
Popup over incoming-call screen
android incoming call screen

If it isn't enough to show a popup over the incoming call UI, then you could make your popup cover the whole screen to hide it. At that point you'll need a way to accept the incoming call without showing the default incoming call screen (which you are now covering). A quick search found this answer that suggests a workaround to accept the incoming call. I'm not sure offhand if there is an official API to do it.

Community
  • 1
  • 1
Dan J
  • 25,433
  • 17
  • 100
  • 173
0

It's impossible to remove the default UI of the incoming call in android, unless you modify the Android OS codings. But instead you can use your own custom UI activity over the default one. It's attained by using the Thread concept(to make the custom designed UI come-over the default one)!!

Exceptional
  • 2,994
  • 1
  • 18
  • 25