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.
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.
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 on this page.
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.
- Can I force my activity on top of incoming call activity? How?
- 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?
- Can I somehow disable, hide incoming call activity?
- If I have no choice but to use TYPE_SYSTEM_[OVERLAY|ERROR|...] how am I to handle user input (touch, click) ?
Thanks.