Android ndk library in ue4 c++ "sensor.h"

greetings

how can i add android ndk sensor library to my c++ code?

#include <android/sensor.h>

do i need to create a link to it?

what kind of parent class i should make for c++ to get the sensor data so blueprint can read it?

i’m not too familiar with c++

i want to get magnetic field sensor data that’s why i need this library.

thanks…:slight_smile:

__k/bit

Just include should do i think as android headers and libs paths should be included via UBT when you compile for android, then you call functions from it normally anywhere you want, good if you do UObject wrapper. Just remember to isolate android code with (including include it self):

#if PLATFROM_ANDROID
...
#endif

or make wrapper in sperate module

thank you .