I have two libraries (.so) that I load into java code.
However, there are several specific operations that require Java (Activity) β C ++ (. So files) calls.
Can I use Native Activity to implement some of these functions? Is the native activity something that is complementary to the traditional activity, or do I need to choose which type of activity I will use?
[EDIT]
there is a set of events that can be processed in native code using active activity
Android NDK / sources / Android / native_app_glue / android_native_app_glue.h
enum { APP_CMD_INPUT_CHANGED, APP_CMD_INIT_WINDOW, APP_CMD_TERM_WINDOW, APP_CMD_WINDOW_RESIZED, APP_CMD_WINDOW_REDRAW_NEEDED, APP_CMD_CONTENT_RECT_CHANGED, APP_CMD_GAINED_FOCUS, APP_CMD_LOST_FOCUS, APP_CMD_CONFIG_CHANGED, APP_CMD_LOW_MEMORY, APP_CMD_START, APP_CMD_RESUME, APP_CMD_SAVE_STATE, APP_CMD_PAUSE, APP_CMD_STOP, APP_CMD_DESTROY, };
since I know that part of my code (which should be called after a certain event) is written in C ++, I think it would be better to deal with this in C ++ through native Activity. However, I have code that needs to be called after processing events in Java.
the question is ... can I have my own version (my own interface) of my activity that will help me with some events and the traditional java interface for the same activity at the same time?
noisy
source share