I played around with the Google Play Games Services SDK a bit and it looks 
like they also have such a kind of dialog that is able to be on top of 
everything else (and even survives activity transitions). It's the 
"welcome" log in message that pops up on top of the screen.

I'm not sure where the code for this popup resides. You may want to take a 
look at the SDK code, though I believe you may not be able find it there 
since it could be part of a system component (Play Services system app).

However, it seems to be possible to add a view to the window from within a 
service:

http://stackoverflow.com/questions/4481226/creating-a-system-overlay-always-on-top-button-in-android
and also
http://stackoverflow.com/questions/12650463/getting-window-display-from-service-android

The only problem is listening to onKeyDown from a service: 
http://stackoverflow.com/questions/3454710/onkeydown-in-a-service-global-hot-keys/3455094#3455094

I guess that would be the only thing where you need to implement your 
firmware customization in order to make that possible.

On Thursday, August 8, 2013 5:22:30 AM UTC-5, Tushar wrote:
>
> Hi,
>
> I need to show a dialog (more like a horizontal bar) on press of a custom 
> Key (on my custom device powered by Android).
> This dialog should appear on top of any other application(say "A") that 
> might be running when the Key is pressed. The app "A" should keep on 
> running and its UI should be visibile (i.e the app "A: should not go to 
> "onPause()"). It should work something similar to SystemUI's volume change 
> dialog when Volume Hard Keys are pressed.  I want to make minimum changes 
> in framework.  My understanding is that I need to make changes in 
> PhoneWindowManager.java to handle the press of custom Key, which will then 
> call my app residing in application layer, which will just inflate the 
> dialog. Would this work? If so, is there a better way to implement it? If 
> not, how can I implement this? 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to