Intents and onActivityResult in native/JNI

2019-05-11 17:25发布

From this post one can see how to send an Intent from a native environment using JNI:

jclass activityClass = jniEnv->FindClass("android/app/Activity");
jmethodID startAcitivtyMethod = jniEnv->GetMethodID(activityClass , "startActivity", "(Landroid/content/Intent;)V");
jniEnv->CallVoidMethod(yourActivityObject, startAcitivityMethod, yourIntentObject);

but is it possible and how can one use startActivityForResult() instead of startActivity() and onActivityResult() to get the result of startActivityForResult()?

How do you access the onActivityResult()?

0条回答
登录 后发表回答