hmm,
ok i see it's not possible, thats a pitty for me. I guess it has something to do with the sandbox-principle of Android, right?
nevertheless thank you for the response(s)!
greetings
mandroid


jeffreyaustinwhite wrote:Anybody have any idea how this might be programmed for Android 2.2. This platform does not support iWindowManager or KeyEvent.isDown() etc... I am really struggling to get a handle on this in the latest platform.
Thanks,
-Jeffrey Austin White
private void sendKeyEvent(String event) {
int eventCode = Integer.parseInt(event);
long now = SystemClock.uptimeMillis();
Log.i("SendKeyEvent", event);
try {
KeyEvent down = new KeyEvent(now, now, KeyEvent.ACTION_DOWN, eventCode, 0);
KeyEvent up = new KeyEvent(now, now, KeyEvent.ACTION_UP, eventCode, 0);
(IWindowManager.Stub
.asInterface(ServiceManager.getService("window")))
.injectKeyEvent(down, true);
(IWindowManager.Stub
.asInterface(ServiceManager.getService("window")))
.injectKeyEvent(up, true);
} catch (RemoteException e) {
Log.i("Input", "DeadOjbectException");
}
}







Users browsing this forum: No registered users and 8 guests