Q:

is it possible to write an app that is invoked by the phone ringing?

I'm guessing the answer is no, but just in case, I'm curious if there's any way to write a receiver that would launch an app when the phone starts to receive a call.  Even something as simple as a dialog activity that says "your phone is ringing". Or is the phone always going to suppress any other app that's trying to run?

A:

You can register a BroadcastReceiver to 'listen' for...
TelephonyManager.ACTION_PHONE_STATE_CHANGED

You can then check EXTRA_STATE for CALL_STATE_RINGING.
However, I'm not sure why you would want to 'launch an app'. You say...

Even something as simple as a dialog activity that says "your phone is ringing".

My phone already tells me when my phone is ringing - I get custom ringtones depending on who is calling me and I get to see their picture too. I'm not quite sure what you're trying to achieve here.

