How to send event in C/C++?

97 views
Skip to first unread message

linl...@gmail.com

unread,
Feb 3, 2009, 12:45:56 AM2/3/09
to android-...@googlegroups.com, android-...@googlegroups.com
hi,
 
I'd like to send a event in C/C++. Do you know how to do that?
 
Thanks.

2009/2/2 <linl...@gmail.com>
hi,
 
I check Android source-codes "system/core/toolbox/sendevent.c", and find it can't work in Emlator and real phone.
Currently, I'm implementing a C/C++ modules that need send a event to system. So, can't call java's interface, such as sendKeySync().
 
How to send event in C/C++?
 
Thanks.
 

Dianne Hackborn

unread,
Feb 3, 2009, 12:56:06 AM2/3/09
to android-...@googlegroups.com, android-...@googlegroups.com
This is not supported from native code.  You can look at the monkey command for an example of how you can write a Java program that can be launched from the shell and sends events to the running system.
--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support.  All such questions should be posted on public forums, where I and others can see and answer them.

Reply all
Reply to author
Forward
0 new messages