I am trying to show an Activity (with Theme Dialog) over an Incoming call Screen to show some information. I am done with the that, but the problem is whenever the call comes, Activity Dialog pops up over it and it covers SLIDER ( for accepting/Rejecting calls) .
I want the Activity Dialog over Incoming call screen but still wants the user to pick/reject calls.
Try this : [Current Caller ID] https://play.google.com/store/apps/details?id=com.webascender.callerid&hl=ms
Sahil Rally wrote:@Steve
Moreover iff you see Toast behavior , it does not obstruct the behavior of incoming call screen.
Toasts are a special UI mechanism, it is hard to equate your UI to them. But it did get me thinking.
Toasts are sort of like timed modal dialogs. They actually do prevent interacting with the UI for a brief period of time (at least on my phones.) I know Android has Modal Dialog support (see http://developer.android.com/guide/topics/ui/dialogs.html). But do they have non-modal dialog support?
Turns out they do. There is a flag in the Windows Manager that can help: FLAG_NOT_TOUCH_MODAL. So you would use a Dialog to display your stuff, and when you make the dialog use myDialog.getWindow().setFlags() with the FLAG_NOT_TOUCH_MODAL flag.
See if that helps you out. I think when dialogs appear they actually dim the background making it hard to see what is around them (to keep your focus). I am sure this is also a Flag, probably in the same WindowManager.LayoutParams class.
One thing I noticed is the Animation on the incoming call screen does not continue, but the control is there and functional.
Sahil Rally wrote:I tried , issue is not of timings, issue is not being able to touch the Slider behind since it disappears when my avtivity is launched over it. The problem still persists ....
Did you try the delay? As I said, in my code above I saw the same behavior. After analyzing it looks like the phone activity gets built in 3 parts. The background, the top portion where the person's picture/incoming info appears, and the bottom part where the answer/reject control sits. It seems (in my demo code) when the dialog appeared before one of the parts, that part would not show up, and it would be most likely to appear before the answer/reject section was visible.
The delay pushed the dialog to not show until after all components were made.
So, 2 things to try:
1) Add the delay before showing your activity
2) Try my code and see if you get different behavior
Here is the code.... Seems like if my Dialog activity launches after the "Second Part" and before the "Third part (ie Answer dialer) , then everything woks fine.
Here is my code..... dont know where the problem is..... and the fact is other applications are successfully doing this.....