当前位置: 首页>>代码示例>>C++>>正文


C++ s3eEdkJNIGetEnv函数代码示例

本文整理汇总了C++中s3eEdkJNIGetEnv函数的典型用法代码示例。如果您正苦于以下问题:C++ s3eEdkJNIGetEnv函数的具体用法?C++ s3eEdkJNIGetEnv怎么用?C++ s3eEdkJNIGetEnv使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了s3eEdkJNIGetEnv函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: is_bluetooth_message_platform

bool is_bluetooth_message_platform()
{
    JNIEnv* env = s3eEdkJNIGetEnv();
    return (bool)env->CallBooleanMethod(g_Obj, g_is_bluetooth_message);
}
开发者ID:dpowazka,项目名称:s3eBluetooth,代码行数:5,代码来源:bluetooth_platform.cpp

示例2: OuyaController_getPlayerNum_platform

int OuyaController_getPlayerNum_platform()
{
    JNIEnv* env = s3eEdkJNIGetEnv();
    return (int)env->CallIntMethod(g_Obj, g_OuyaController_getPlayerNum);
}
开发者ID:Arg410,项目名称:ouya-sdk-examples,代码行数:5,代码来源:ODK_platform.cpp

示例3: InitAds_platform

s3eResult InitAds_platform(const char* pub_id)
{
    JNIEnv* env = s3eEdkJNIGetEnv();
    jstring pub_id_jstr = env->NewStringUTF(pub_id);
    return (s3eResult)env->CallIntMethod(g_Obj, g_InitAds, pub_id_jstr);
}
开发者ID:chinnurtb,项目名称:admob1,代码行数:6,代码来源:AdmobAds_platform.cpp

示例4: OuyaController_selectControllerByDeviceID_platform

bool OuyaController_selectControllerByDeviceID_platform(int deviceID)
{
    JNIEnv* env = s3eEdkJNIGetEnv();
    return (bool)env->CallBooleanMethod(g_Obj, g_OuyaController_selectControllerByDeviceID, deviceID);
}
开发者ID:Arg410,项目名称:ouya-sdk-examples,代码行数:5,代码来源:ODK_platform.cpp

示例5: OuyaController_getButton_platform

bool OuyaController_getButton_platform(int button)
{
    JNIEnv* env = s3eEdkJNIGetEnv();
    return (bool)env->CallBooleanMethod(g_Obj, g_OuyaController_getButton, button);
}
开发者ID:Arg410,项目名称:ouya-sdk-examples,代码行数:5,代码来源:ODK_platform.cpp

示例6: MATSetLocation_platform

void MATSetLocation_platform(double latitude, double longitude, double altitude)
{
	JNIEnv* env = s3eEdkJNIGetEnv();
	env->CallVoidMethod(g_Obj, g_MATSetLocation, latitude, longitude, altitude);
}
开发者ID:MightyRabbitStudios,项目名称:sdk-plugins,代码行数:5,代码来源:s3eMATSDK_platform.cpp

示例7: OuyaController_startOfFrame_platform

void OuyaController_startOfFrame_platform()
{
    JNIEnv* env = s3eEdkJNIGetEnv();
    env->CallVoidMethod(g_Obj, g_OuyaController_startOfFrame);
}
开发者ID:Arg410,项目名称:ouya-sdk-examples,代码行数:5,代码来源:ODK_platform.cpp

示例8: PollFishShow_platform

void PollFishShow_platform()
{
    JNIEnv* env = s3eEdkJNIGetEnv();
    env->CallVoidMethod(g_Obj, g_PollFishShow);
}
开发者ID:agramonte,项目名称:CGPollFish,代码行数:5,代码来源:CGPollfish_platform.cpp

示例9: CGPollfishInit_platform

s3eResult CGPollfishInit_platform()
{

    // Get the environment from the pointer
    JNIEnv* env = s3eEdkJNIGetEnv();
    jobject obj = NULL;
    jmethodID cons = NULL;
    
    
    const JNINativeMethod nativeMethodDefs[] = {
        { "native_notifyReceived", "()V", (void *)&native_notifyReceived },
        { "native_notifyNotAvailable", "()V", (void *)&native_notifyNotAvailable },
        { "native_notifyCompleted", "()V", (void *)&native_notifyCompleted },
        { "native_notifyOpened", "()V", (void *)&native_notifyOpened },
        { "native_notifyClosed", "()V", (void *)&native_notifyClosed },
        { "native_notifyNotEligible", "()V", (void *)&native_notifyNotEligible },
        
    };

    // Get the extension class
    jclass cls = s3eEdkAndroidFindClass("CGPollfish");
    if (!cls)
        goto fail;

    // Get its constructor
    cons = env->GetMethodID(cls, "<init>", "()V");
    if (!cons)
        goto fail;

    // Construct the java class
    obj = env->NewObject(cls, cons);
    if (!obj)
        goto fail;

    // Get all the extension methods
    g_PollFishInit = env->GetMethodID(cls, "PollFishInit", "(Ljava/lang/String;IILjava/lang/String;)V");
    if (!g_PollFishInit)
        goto fail;

    g_PollFishHide = env->GetMethodID(cls, "PollFishHide", "()V");
    if (!g_PollFishHide)
        goto fail;

    g_PollFishShow = env->GetMethodID(cls, "PollFishShow", "()V");
    if (!g_PollFishShow)
        goto fail;

    if(env->RegisterNatives(cls, nativeMethodDefs, sizeof(nativeMethodDefs)/sizeof(nativeMethodDefs[0])))
        goto fail;

    IwTrace(CGPOLLFISH, ("CGPOLLFISH init success"));
    g_Obj = env->NewGlobalRef(obj);
    env->DeleteLocalRef(obj);
    env->DeleteGlobalRef(cls);

    // Add any platform-specific initialisation code here
    return S3E_RESULT_SUCCESS;

fail:
    jthrowable exc = env->ExceptionOccurred();
    if (exc)
    {
        env->ExceptionDescribe();
        env->ExceptionClear();
        IwTrace(CGPollfish, ("One or more java methods could not be found"));
    }

    env->DeleteLocalRef(obj);
    env->DeleteGlobalRef(cls);
    return S3E_RESULT_ERROR;

}
开发者ID:agramonte,项目名称:CGPollFish,代码行数:72,代码来源:CGPollfish_platform.cpp

示例10: bluetooth_show_wrong_version_dialog_platform

void bluetooth_show_wrong_version_dialog_platform()
{
    JNIEnv* env = s3eEdkJNIGetEnv();
    env->CallVoidMethod(g_Obj, g_bluetooth_show_wrong_version_dialog);
}
开发者ID:dpowazka,项目名称:s3eBluetooth,代码行数:5,代码来源:bluetooth_platform.cpp

示例11: bluetoothInit_platform

s3eResult bluetoothInit_platform()
{
    // Get the environment from the pointer
    JNIEnv* env = s3eEdkJNIGetEnv();
    jobject obj = NULL;
    jmethodID cons = NULL;

    // Get the extension class
    jclass cls = s3eEdkAndroidFindClass("bluetooth");
    if (!cls)
        goto fail;

    // Get its constructor
    cons = env->GetMethodID(cls, "<init>", "()V");
    if (!cons)
        goto fail;

    // Construct the java class
    obj = env->NewObject(cls, cons);
    if (!obj)
        goto fail;

    // Get all the extension methods
    g_init_bluetooth = env->GetMethodID(cls, "init_bluetooth", "()Z");
    if (!g_init_bluetooth)
        goto fail;

    g_enable_bluetooth = env->GetMethodID(cls, "enable_bluetooth", "()V");
    if (!g_enable_bluetooth)
        goto fail;

    g_disable_bluetooth = env->GetMethodID(cls, "disable_bluetooth", "()V");
    if (!g_disable_bluetooth)
        goto fail;

    g_is_bluetooth_enabled = env->GetMethodID(cls, "is_bluetooth_enabled", "()Z");
    if (!g_is_bluetooth_enabled)
        goto fail;

    g_bluetooth_close = env->GetMethodID(cls, "bluetooth_close", "()V");
    if (!g_bluetooth_close)
        goto fail;

    g_bluetooth_enable_discoverability = env->GetMethodID(cls, "bluetooth_enable_discoverability", "()V");
    if (!g_bluetooth_enable_discoverability)
        goto fail;

    g_bluetooth_is_discovering = env->GetMethodID(cls, "bluetooth_is_discovering", "()Z");
    if (!g_bluetooth_is_discovering)
        goto fail;

    g_bluetooth_setup_client = env->GetMethodID(cls, "bluetooth_setup_client", "()V");
    if (!g_bluetooth_setup_client)
        goto fail;

    g_is_bluetooth_connected = env->GetMethodID(cls, "is_bluetooth_connected", "()Z");
    if (!g_is_bluetooth_connected)
        goto fail;

    g_bluetooth_message_start = env->GetMethodID(cls, "bluetooth_message_start", "()V");
    if (!g_bluetooth_message_start)
        goto fail;

    g_bluetooth_message_write_float = env->GetMethodID(cls, "bluetooth_message_write_float", "(Ljava/lang/String;)V");
    if (!g_bluetooth_message_write_float)
        goto fail;

    g_bluetooth_message_write_int = env->GetMethodID(cls, "bluetooth_message_write_int", "(I)V");
    if (!g_bluetooth_message_write_int)
        goto fail;

    g_bluetooth_message_send_current = env->GetMethodID(cls, "bluetooth_message_send_current", "()V");
    if (!g_bluetooth_message_send_current)
        goto fail;

    g_is_bluetooth_message = env->GetMethodID(cls, "is_bluetooth_message", "()Z");
    if (!g_is_bluetooth_message)
        goto fail;

    g_bluetooth_message_read_int = env->GetMethodID(cls, "bluetooth_message_read_int", "()I");
    if (!g_bluetooth_message_read_int)
        goto fail;

    g_bluetooth_message_read_float = env->GetMethodID(cls, "bluetooth_message_read_float", "()F");
    if (!g_bluetooth_message_read_float)
        goto fail;

    g_bluetooth_message_discard_current = env->GetMethodID(cls, "bluetooth_message_discard_current", "()V");
    if (!g_bluetooth_message_discard_current)
        goto fail;

    g_bluetooth_show_wrong_version_dialog = env->GetMethodID(cls, "bluetooth_show_wrong_version_dialog", "()V");
    if (!g_bluetooth_show_wrong_version_dialog)
        goto fail;



    IwTrace(BLUETOOTH, ("BLUETOOTH init success"));
    g_Obj = env->NewGlobalRef(obj);
    env->DeleteLocalRef(obj);
//.........这里部分代码省略.........
开发者ID:dpowazka,项目名称:s3eBluetooth,代码行数:101,代码来源:bluetooth_platform.cpp

示例12: bluetooth_message_discard_current_platform

void bluetooth_message_discard_current_platform()
{
    JNIEnv* env = s3eEdkJNIGetEnv();
    env->CallVoidMethod(g_Obj, g_bluetooth_message_discard_current);
}
开发者ID:dpowazka,项目名称:s3eBluetooth,代码行数:5,代码来源:bluetooth_platform.cpp

示例13: bluetooth_message_read_float_platform

float bluetooth_message_read_float_platform()
{
    JNIEnv* env = s3eEdkJNIGetEnv();
    return (float)env->CallFloatMethod(g_Obj, g_bluetooth_message_read_float);
}
开发者ID:dpowazka,项目名称:s3eBluetooth,代码行数:5,代码来源:bluetooth_platform.cpp

示例14: bluetooth_message_read_int_platform

int bluetooth_message_read_int_platform()
{
    JNIEnv* env = s3eEdkJNIGetEnv();
    return (int)env->CallIntMethod(g_Obj, g_bluetooth_message_read_int);
}
开发者ID:dpowazka,项目名称:s3eBluetooth,代码行数:5,代码来源:bluetooth_platform.cpp

示例15: MATSetAge_platform

void MATSetAge_platform(int age)
{
	JNIEnv* env = s3eEdkJNIGetEnv();
	env->CallVoidMethod(g_Obj, g_MATSetAge, age);
}
开发者ID:MightyRabbitStudios,项目名称:sdk-plugins,代码行数:5,代码来源:s3eMATSDK_platform.cpp


注:本文中的s3eEdkJNIGetEnv函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。