0

I'm trying to build an Android NDK application(C++) that sometimes changes the mouse position.

In this answer: https://stackoverflow.com/a/2433488/2584197 I found that I probably need to use the X11 library and set the position by XWarpPointer function.

I also saw that I need to add the -lX11 flag to the gcc complaining so I've tried to do that by the LDLIBS:

LOCAL_LDLIBS := -lX11

But I get the error:

Android.mk: error: "my_app (EXECUTABLES android-arm) missing libX11 (SHARED_LIBRARIES android-arm)"

So my question is how can I get the lx11 library to work on Android c++ applications or is there any alternative option to change the mouse position by c++ code on Android?

Edit: Thanks to Richard, I found that it's not possible to use libX11 ON android.

Is there another way to change the mouse cursor in Android?

Thanks!

  • 1
    Does this answer your question? [Android Graphics Internals](https://stackoverflow.com/questions/4579573/android-graphics-internals) _"...Android doesn't use DirectFB or X11 or any other existing Linux solution...."_ – Richard Critten Dec 29 '22 at 18:29
  • Yes, thanks, but only about the libX11. I still need a way to change the mouse cursor. – Netanel Hadad Dec 30 '22 at 06:22

0 Answers0