I created a program that displays a toast every time I receive an incoming call. It works great on all the phones I've tried - toasts displayed on the incoming call screen.
Yesterday I upgraded my HTC Desire S to Sense 3.0 (Android 2.3.5) and apparently it has a new lock screen that displays incoming calls. Opening the lock screen will lead me to the "original" screen of incoming calls and answer the call. I can also see my toast on the initial call screen for just a second, before answering the call.
The toast I am showing uses a custom layout and it displays from the service. The service receives the intent from the broadcast receiver on an incoming call.
I use the following code to show my toast:
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); View layout = inflater.inflate(R.layout.popup_toast, null); toast = new Toast(getApplicationContext()); toast.setGravity(Gravity.TOP | Gravity.FILL_HORIZONTAL, 0, 0); toast.setDuration(Toast.LENGTH_SHORT); toast.setView(layout); toast.show();
Is there a way to set the toast to appear on top of the new Sense 3.0 lock screen?
Franz source share