Hi,

I am using Monkeyrunner to do some automation testing  on my apps. But it
didn't seem that this is long press solution on power key. As we know, we
can get "Phone options" menu with "Silent mode", "Airplane mode", "Power
off" when we long press hard power key manually. But when i use the
following statement:

device.press("KEYCODE_POWER","DOWN")

I am not able to get the expected "Phone options" menu, I got the screen
locked. That's  to say, the same result in using the following statement:

device.press("KEYCODE_POWER","DOWN_AND_UP")

So I can come to conclusion the MonkeyRunner API is not really to get long
press hard key implemented. And I can see there is method
performedLongPress<http://androidappdocs.appspot.com/reference/android/view/KeyEvent.DispatcherState.html#performedLongPress%28android.view.KeyEvent%29>
(KeyEvent<http://androidappdocs.appspot.com/reference/android/view/KeyEvent.html>event)
from android.view.KeyEvent.DispatcherState to handle long press key.

so can we have this in MonkeyRunner API in the incoming release version?

Thanks

Harrison Feng
*
*

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to