本文整理汇总了C++中JNIEnv::CallBooleanMethodV方法的典型用法代码示例。如果您正苦于以下问题:C++ JNIEnv::CallBooleanMethodV方法的具体用法?C++ JNIEnv::CallBooleanMethodV怎么用?C++ JNIEnv::CallBooleanMethodV使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JNIEnv
的用法示例。
在下文中一共展示了JNIEnv::CallBooleanMethodV方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool FJavaClassObject::CallMethod<bool>(FJavaClassMethod Method, ...)
{
JNIEnv* JEnv = FAndroidApplication::GetJavaEnv();
va_list Params;
va_start(Params, Method);
bool RetVal = JEnv->CallBooleanMethodV(Object, Method.Method, Params);
va_end(Params);
VerifyException();
return RetVal;
}
示例2: CallBooleanMethod
jboolean JObject::CallBooleanMethod(IN const char* methodName, IN const char* sig, IN ...) {
JNIEnv* env = mJNIEnvGetter.get();
jmethodID id = GetMethodID_(env, mJObject, methodName, sig);
va_list ap;
va_start(ap, sig);
jboolean result = env->CallBooleanMethodV(mJObject, id, ap);
va_end(ap);
return result;
}
示例3: callBooleanMethodOnJavaListener
jboolean CinderDelegate::callBooleanMethodOnJavaListener(const char *name, const char *sig, ...)
{
JNIEnv *env;
mJavaVM->GetEnv((void**)&env, JNI_VERSION_1_4);
jclass cls = env->GetObjectClass(mJavaListener);
jmethodID method = env->GetMethodID(cls, name, sig);
va_list args;
va_start(args, sig);
jboolean ret = env->CallBooleanMethodV(mJavaListener, method, args);
va_end(args);
return ret;
}
示例4: CallBooleanMethod
bool JNIHelper::CallBooleanMethod(jobject object, const char *strMethodName,
const char *strSignature, ...) {
bool b;
if (activity_ == NULL) {
LOGI("JNIHelper has not been initialized. Call init() to initialize the "
"helper");
return false;
}
JNIEnv *env = AttachCurrentThread();
jclass cls = env->GetObjectClass(object);
jmethodID mid = env->GetMethodID(cls, strMethodName, strSignature);
if (mid == NULL) {
LOGI("method ID %s, '%s' not found", strMethodName, strSignature);
return false;
}
va_list args;
va_start(args, strSignature);
b = env->CallBooleanMethodV(object, mid, args);
va_end(args);
env->DeleteLocalRef(cls);
return b;
}