Hi All,
I am customizing Recent app Dialog. It has for recent app and
other 4 buttons to simulate Menu, Back, Volume + and Volume -.
My requirement is to send keys (Menu, Back, volume)to active
app from the recent app dialog.
I had tried following piece of code. But I couldn't find the
solution.
public boolean onTouchEvent() {
final Activity parent = (Activity) this.getContext();
new Thread(new Runnable() {
public void run() {
// simulateKeyStroke(KeyEvent.KEYCODE_HOME, parent);
KeyEvent backEvtDown = new
KeyEvent(KeyEvent.ACTION_DOWN,
KeyEvent.KEYCODE_BACK);
KeyEvent backEvtUp =
new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK);
parent.dispatchKeyEvent(backEvtDown);
parent.dispatchKeyEvent(backEvtUp);
}
}).start();
return true;
}
I am getting following error
request_suspend_state: wakeup (0->0) at 83966461184 (2000-01-01
00:01:21.6171875
00 UTC)
init: untracked pid 1399 exited
binder: 916: binder_alloc_buf, no vma
binder: 1427:1427 transaction failed 29201, size 76-4
binder: 916: binder_alloc_buf, no vma
binder: 1427:1427 transaction failed 29201, size 84-0
request_suspend_state: wakeup (0->0) at 89261505130 (2000-01-01
00:01:26.9122619
64 UTC)
Can any one help me.
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting