Ilya Nesterov
2018-02-02 01:06:11 UTC
Hi,
I'm playing around with native activity and android_native_app_glue. My
current experiment is whether I can access from NDK an activity created
from Java.
So, it is more clear what is going on when you create a native activity,
because when you implement android_main , android_app structure is created
for you and passed to the android_main as a parameter.
My question is: If I create activity in Java, can I access the activity
from native code through JNI?
I think Ill need to create android_app structure manually but
passing ANativeActivity* activity and AConfiguration* config and other
stuff which might be accessible through JNIEnv *env. I want to reference
current activity to catchAMotionEvent_* events.
is it possible? Am I going in the right direction?
I'm playing around with native activity and android_native_app_glue. My
current experiment is whether I can access from NDK an activity created
from Java.
So, it is more clear what is going on when you create a native activity,
because when you implement android_main , android_app structure is created
for you and passed to the android_main as a parameter.
My question is: If I create activity in Java, can I access the activity
from native code through JNI?
I think Ill need to create android_app structure manually but
passing ANativeActivity* activity and AConfiguration* config and other
stuff which might be accessible through JNIEnv *env. I want to reference
current activity to catchAMotionEvent_* events.
is it possible? Am I going in the right direction?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/c2b6d8d4-d0d1-4ebc-bbb8-a4c3be43c761%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/c2b6d8d4-d0d1-4ebc-bbb8-a4c3be43c761%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.