Replace native outgoing call Screen by custom screen android

后端 未结 3 656
眼角桃花
眼角桃花 2021-02-11 06:37

I am trying to launch my custom screen on top of native outgoing caller screen that may contain full Screen image of Caller and some buttons for actions like reject call. Using

3条回答
  •  隐瞒了意图╮
    2021-02-11 07:17

    Write a receiver for outgoing call

    public class OutgoingCallReceiver extends BroadcastReceiver {
    @Override
        public void onReceive(final Context context, final Intent intent) {
          //Write intent for yout page
      }
    }
    

    add these to Manifest

    
    
    
    
       
          
       
     
    

    add below theme to activity theme

    android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
    

    Open you intent after 1 second bcoz the original outgoing call screen takes 800ms to open so you need to over lay that screen, so you must call intent after 800ms. it works for me.

提交回复
热议问题