Show full screen Incoming Call Activity in Android

Viewed 2137

In Android sometimes when we use an app and we receive a call , appears the full screen Incoming call activity

Full screen incoming call service

Instead if i create a new blank main activity and i put a simple BroadCast receiver, when im in the main activity and i receive a call this compares:

Incoming call notification popup

There is a way to show the full screen incoming call or just hide the incoming call popup notification ? I searched a lot but i have not found anything...

MainActivity.java

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
}

public static class PhoneStateReceiver extends BroadcastReceiver {
    public void onReceive(Context context, Intent intent) {

        Toast.makeText(context, "OK", Toast.LENGTH_LONG).show();
    }
}

}

1 Answers

in android The system UI may choose to display a heads-up notification, instead of launching your full-screen intent, while the user is using the device. check it out Display time-sensitive notifications

Related