[android-developers] Re: Displaying the long Press Power off screen/dialog

2013-06-26 Thread amey523
okButton.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN | KeyEvent.FLAG_VIRTUAL_HARD_KEY |KeyEvent.FLAG_KEEP_TOUCH_MODE,KeyEvent.KEYCODE_POWER)); doesn't work so I guess the API's are built to accept the Power key events from 3rd party Applications On Tuesday, June 25, 2013 12:42:46 PM UTC

Re: [android-developers] Re: Displaying the long Press Power off screen/dialog

2013-06-25 Thread Ken Chen
-Original Message- From: Piren Sender: android-developers@googlegroups.com Date: Tue, 25 Jun 2013 04:53:07 To: Reply-To: android-developers@googlegroups.com Subject: [android-developers] Re: Displaying the long Press Power off screen/dialog this is not what he asked. OP: Try sending

[android-developers] Re: Displaying the long Press Power off screen/dialog

2013-06-25 Thread amey523
dispatchKeyEvent(); has been deprecated in 4.1. Will need to figure that out On Tuesday, June 25, 2013 12:53:07 PM UTC+1, Piren wrote: > > this is not what he asked. > > OP: Try sending events using > > http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_

[android-developers] Re: Displaying the long Press Power off screen/dialog

2013-06-25 Thread amey523
Yes, if forcing it through key code events work its fine with me. On Tuesday, June 25, 2013 12:53:07 PM UTC+1, Piren wrote: > > this is not what he asked. > > OP: Try sending events using > > http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_POWER > > (this thread deals wi

[android-developers] Re: Displaying the long Press Power off screen/dialog

2013-06-25 Thread Piren
this is not what he asked. OP: Try sending events using http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_POWER (this thread deals with the Menu key, it might help you as well: https://groups.google.com/forum/#!topic/android-developers/ZAXh2EKewKM ) On Tuesday, June 25

[android-developers] Re: Displaying the long Press Power off screen/dialog

2013-06-25 Thread reaktor24
I am sure there is no way you can override the power button as it is an integral feature of smartphones just like the home button which also cannot be overridden. On Monday, 24 June 2013 16:33:46 UTC+1, ame...@googlemail.com wrote: > > Hey everyone, is there a way in Android to show the Phone Op