top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Need to show a dialog on top of all other Apps for a custom hardware on Android

0 votes
620 views

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 visible (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?

posted Aug 9, 2013 by Jai Prakash

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
Quick question: why not just show it in the notification bar?  Thats what it was made for..

2 Answers

+1 vote

U need a service that listen to keystrokes and show a toast, or u can use DialogInterface.

answer Aug 9, 2013 by Seema Siddique
+1 vote

use

intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
answer Aug 9, 2013 by Amit Parthsarthi
Similar Questions
+2 votes

Similar to HAL for enabling s/w apps development on variety of h/w platforms, can a generic OS abstraction Layer ( OAL) be developed such that the apps written on top be immediately supported on all underlying platform?

IOAL can expore two interfaces. The southbound will expose open APIs towards the underlying OS ( Android/IOS/WIndows/Blackberry) which can then invoke the native APIs on OS. More than APIs the other mechanism of dealing with underlying OS will be embedded in this interface.

The northbound interface will be the standard APIs towards the APPs. This will be uniform across platforms. The OAL will also manage abstracted resources inside as it may be required to manage the underlying OS.

There will be no h/w intelligence/awareness inside this layer. This may puncture the individual power of popular platforms which draw strength from number of apps on it.

+2 votes

I am developing an android application and I want my app to be able to receive data from other apps. How can I do that?

+1 vote

I working on a project which needs adding a service with JNI to the system server and also a new daemon in init.rc script. I have successfully done this.
I might need the system service to periodically send SIGUSR1/2 signals to the daemon. Linux requires a sender of signals to be root. Do I have this privilege inside system server in Android?

+1 vote

I want to define a new theme in framework, and override the alert dialog style. Please help...

...