C,c++ program sample for touchscreen in android

1,351 views
Skip to first unread message

u_r_man

unread,
Oct 5, 2010, 7:04:19 AM10/5/10
to android-ndk
can anybody pls give me sample c,c++ programs related to touch screen?

Tim Mensch

unread,
Oct 5, 2010, 1:35:22 PM10/5/10
to andro...@googlegroups.com
On 10/5/2010 5:04 AM, u_r_man wrote:
> can anybody pls give me sample c,c++ programs related to touch screen?
You can't access the touch screen from C or C++. You'll need to get the
touch events from Java and send them to C/C++ through JNI.

See:

http://developer.android.com/reference/android/view/View.html#onTouchEvent%28android.view.MotionEvent%29

And:

http://android.git.kernel.org/?p=platform/dalvik.git;a=blob_plain;f=docs/jni-tips.html;hb=HEAD

Tim

u_r_man

unread,
Oct 5, 2010, 11:55:56 PM10/5/10
to android-ndk
THanx. that was helpful
Reply all
Reply to author
Forward
0 new messages