本文整理汇总了C++中getStaticMethodInfo函数的典型用法代码示例。如果您正苦于以下问题:C++ getStaticMethodInfo函数的具体用法?C++ getStaticMethodInfo怎么用?C++ getStaticMethodInfo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getStaticMethodInfo函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setBackgroundMusicVolumeJNI
void setBackgroundMusicVolumeJNI(float volume)
{
// void setBackgroundMusicVolume()
#if 0
JniMethodInfo methodInfo;
if (! getStaticMethodInfo(methodInfo, "setBackgroundMusicVolume", "(F)V"))
{
return ;
}
methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, volume);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
#endif
}
示例2: getStaticMethodInfo
bool DeviceUtils::isWifiEnabled()
{
JniMethodInfo minfo;
bool isHave = getStaticMethodInfo(minfo, JAVA_CLS_DEVICE, "isWifiEnabled", "()Z");
if(!isHave){
return false;
}
jboolean ret = minfo.env->CallStaticBooleanMethod(minfo.classID, minfo.methodID);
CCLog("wifiEnabled: %d", ret);
minfo.env->DeleteLocalRef(minfo.classID);
if(ret){
return true;
}
return false;
}
示例3: preloadEffectJNI
void preloadEffectJNI( const char *path )
{
// void preloadEffect(String)
JniMethodInfo methodInfo;
if( !getStaticMethodInfo( methodInfo, "preloadEffect", "(Ljava/lang/String;)V" ) ) {
LOGE( "error01:%s", __FUNCTION__ );
return;
}
jstring stringArg = methodInfo.env->NewStringUTF( path );
methodInfo.env->CallStaticVoidMethod( methodInfo.classID, methodInfo.methodID, stringArg );
methodInfo.env->DeleteLocalRef( stringArg );
methodInfo.env->DeleteLocalRef( methodInfo.classID );
}
示例4: playBackgroundMusicJNI
void playBackgroundMusicJNI(const char *path, bool isLoop)
{
// void playBackgroundMusic(String,boolean)
JniMethodInfo methodInfo;
if (! getStaticMethodInfo(methodInfo, "playBackgroundMusic", "(Ljava/lang/String;Z)V"))
{
return;
}
jstring stringArg = methodInfo.env->NewStringUTF(path);
methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, stringArg, isLoop);
methodInfo.env->DeleteLocalRef(stringArg);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
}
示例5: compareDateJNI
long compareDateJNI(const char* startDate)
{
JniMethodInfo methodInfo;
jlong ret = 0;
if (! getStaticMethodInfo(methodInfo, "compareDate", "(Ljava/lang/String;)J"))
{
return ret;
}
jstring stringArg = methodInfo.env->NewStringUTF(startDate);
ret = methodInfo.env->CallStaticLongMethod(methodInfo.classID, methodInfo.methodID, stringArg);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
return ret;
}
示例6: resumeBackgroundMusicJNI
void resumeBackgroundMusicJNI()
{
// void resumeBackgroundMusic()
#if 0
JniMethodInfo methodInfo;
if (! getStaticMethodInfo(methodInfo, "resumeBackgroundMusic", "()V"))
{
return;
}
methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
#endif
}
示例7: playFrameVideoJNI
void playFrameVideoJNI(const char* frameImgPath, const char* contentPath, int x, int y, int width, int height)
{
JniMethodInfo methodInfo;
if (! getStaticMethodInfo(methodInfo, "playFrameVideo", "(Ljava/lang/String;Ljava/lang/String;IIII)V"))
{
return ;
}
jstring stringArg1 = methodInfo.env->NewStringUTF(frameImgPath);
jstring stringArg2 = methodInfo.env->NewStringUTF(contentPath);
methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, stringArg1, stringArg2, x, y, width, height);
methodInfo.env->DeleteLocalRef(stringArg1);
methodInfo.env->DeleteLocalRef(stringArg2);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
}
示例8: stopAllEffectsJNI
void stopAllEffectsJNI()
{
#if 0
// void stopAllEffects()
JniMethodInfo methodInfo;
if (! getStaticMethodInfo(methodInfo, "stopAllEffects", "()V"))
{
return ;
}
methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
#endif
}
示例9: resumeEffectJNI
void resumeEffectJNI(unsigned int nSoundId)
{
// void resumeEffect(int)
#if 0
JniMethodInfo methodInfo;
if (! getStaticMethodInfo(methodInfo, "resumeEffect", "(I)V"))
{
return ;
}
methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, (int)nSoundId);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
#endif
}
示例10: endJNI
void endJNI()
{
// void end()
#if 0
JniMethodInfo methodInfo;
if (! getStaticMethodInfo(methodInfo, "end", "()V"))
{
return ;
}
methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
#endif
}
示例11: preloadBackgroundMusicJNI
void preloadBackgroundMusicJNI( const char *path )
{
LOGD( "%s:%s", __FUNCTION__, path );
// void playBackgroundMusic(String,boolean)
JniMethodInfo methodInfo;
if( !getStaticMethodInfo( methodInfo, "preloadBackgroundMusic", "(Ljava/lang/String;)V" ) ) {
LOGE( "error01:%s", __FUNCTION__ );
return;
}
jstring stringArg = methodInfo.env->NewStringUTF( path );
methodInfo.env->CallStaticVoidMethod( methodInfo.classID, methodInfo.methodID, stringArg );
methodInfo.env->DeleteLocalRef( stringArg );
methodInfo.env->DeleteLocalRef( methodInfo.classID );
}
示例12: unloadEffectJNI
void unloadEffectJNI(const char* path)
{
// void unloadEffect(String)
JniMethodInfo methodInfo;
if (! getStaticMethodInfo(methodInfo, "unloadEffect", "(Ljava/lang/String;)V"))
{
return ;
}
jstring stringArg = methodInfo.env->NewStringUTF(path);
methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, stringArg);
methodInfo.env->DeleteLocalRef(stringArg);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
}
示例13: getFreeSpaceJNI
long long getFreeSpaceJNI()
{
// int getFreeSpace()
JniMethodInfo methodInfo;
jlong ret = 0;
if (! getStaticMethodInfo(methodInfo, "getFreeSpace", "()J"))
{
return ret;
}
ret = methodInfo.env->CallStaticLongMethod(methodInfo.classID, methodInfo.methodID);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
return ret;
}
示例14: getNetworkStateJNI
bool getNetworkStateJNI()
{
// boolean getNetworkState()
JniMethodInfo methodInfo;
jboolean ret = false;
if (! getStaticMethodInfo(methodInfo, "getNetworkState", "()Z"))
{
return ret;
}
ret = methodInfo.env->CallStaticBooleanMethod(methodInfo.classID, methodInfo.methodID);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
return ret;
}
示例15: sendLMSCenterJNI
unsigned int sendLMSCenterJNI()
{
// int sendLMSCenter()
JniMethodInfo methodInfo;
int ret = 0;
if (! getStaticMethodInfo(methodInfo, "sendLMSCenter", "()I"))
{
return ret;
}
ret = methodInfo.env->CallStaticIntMethod(methodInfo.classID, methodInfo.methodID);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
return (unsigned int)ret;
}