Override incoming call screen?
<p>Hello I was wondering if there is a way to override the incoming call screen to add more functionality to it?  If so could you either point me in the right direction or provide some sample code? </p>

<p>--------------------------------------------------EDIT: --------------------------</p>

<p>I got the receiver working well when the call comes in but how would I get the current window to override the call screen? This is what I got so far... but i get a classCastException trying to cast to activity from context, I cant think of any other way to gain access to the window.</p>

<pre><code>@Override
    public void onReceive(Context context, Intent intent) {
        Bundle extras = intent.getExtras();
        if (extras != null) {
            String state = extras.getString(TelephonyManager.EXTRA_STATE);
            Log.w("DEBUG", state);
            Log.w("DEBUG", "-------------------------------------------------- Broadcast Received");
            if (state.equals(TelephonyManager.EXTRA_STATE_RINGING)) {
                String phoneNumber = extras
                        .getString(TelephonyManager.EXTRA_INCOMING_NUMBER);
                Log.w("DEBUG", phoneNumber);
                Activity activity = (Activity)context.getApplicationContext();
                Window window = activity.getParent().getWindow();
                window.addContentView(window.findViewById(R.layout.textalertbuttonview),null);
                Log.w("DEBUG", "------------------------Button Added");

            }
        }
        else {
            Log.w("DEBUG", "---------------------------------------------------no Extras");
        }
    }
</code></pre>

<p>--------------------------------------------------EDIT 2: --------------------------</p>

<p>It doesn't seem after some research that I can actually add elements to the actual incoming call screen.  So I will have to make my own view and override the incoming call screen.  But I am still open for ideas...  I saw incoming call plus but can not find the source code for that project.</p>
