title: How to have custom activity on top of incoming phone call screen?
body: <p>I'm having trouble making what I thought would be smaller app. Primary focus is having activity on top of incoming call screen, with custom controls which would give user custom control ability (blocking, selecting etc...). However after hours (days) of googling and search here on SO I have found quite a few non working examples.</p>
  
  <p>I develop on Android 2.3.3 and would like to have that platform as minimal support but if moving to 4.x platform would take the pain away I would be able to switch.</p>
  
  <p>I have tried many approaches but only one that seems to be working for now is to addView() to WindowManager with custom LayoutParams using TYPE_SYSTEM_OVERLAY or TYPE_SYSTEM_ERROR. Problem is not having any touch/key inputs as stated <a href="https://stackoverflow.com/questions/9085022/android-overlay-to-grab-all-touch-and-pass-them-on">on this page</a>.</p>
  
  <p>I'm having BroadcastReceiver that is activated for PHONE_STATE broadcast, and on receiving broadcast I start new intent. Trouble is phone screen call activity kicks in and shows up, straight to the top.</p>
  
  <ul>
  <li>Can I force my activity on top of incoming call activity? How?</li>
  <li>Can I prevent broadcast further? I guess theoretically on 4.1+ for which PHONE_STATE is ordered broadcast I could but I'm skeptical; and how would I achieve same thing on 2.3.3 where PHONE_STATE is non ordered broadcast?</li>
  <li>Can I somehow disable, hide incoming call activity? </li>
  <li>If I have no choice but to use TYPE_SYSTEM_[OVERLAY|ERROR|...] how am I to handle user input (touch, click) ?</li>
  </ul>
  
  <p>Thanks.</p>