Ejemplo n.º 1
0
    void InitCinemaNativeInterface(string packageName)
    {
#if UNITY_ANDROID && !UNITY_EDITOR
        AndroidJavaClass nativeInterfaceClass = new AndroidJavaClass(string.Format("com.ssnwt.vr.{0}.jni.NativeInterface", packageName));
        if (nativeInterfaceClass == null)
        {
            return;
        }
        AndroidJavaObject AndroidInterface = nativeInterfaceClass.CallStatic <AndroidJavaObject>("getInstance");
        if (AndroidInterface == null)
        {
            return;
        }

        AndroidInterface.Call("init", GlobalAppManage.GetJApplication());

        switch (packageName)
        {
        case "mediascan":
            AndroidMediaScanInterface = AndroidInterface;
            break;

        case "playermanager":
            AndroidPlayerInterface = AndroidInterface;
            break;
        }
        LogTool.Log("AndroidInterface通过jApplication初始化, InitCinemaNativeInterface");
#endif
    }
Ejemplo n.º 2
0
    void InitAndroidInterface()
    {
        if (IsInit)
        {
            return;
        }

        IsInit = true;
#if UNITY_ANDROID && !UNITY_EDITOR
        AndroidJavaClass AndroidInterfaceClass = new AndroidJavaClass("com.ssnwt.vr.androidmanager.AndroidInterface");
        if (AndroidInterfaceClass == null)
        {
            return;
        }

        AndroidInterface = AndroidInterfaceClass.CallStatic <AndroidJavaObject>("getInstance");
        if (AndroidInterface == null)
        {
            return;
        }

        AndroidInterface.Call("init", GlobalAppManage.GetJApplication());
        LogTool.Log("AndroidInterface通过jApplication初始化");
#endif
    }
Ejemplo n.º 3
0
 void BackHome()
 {
     GlobalAppManage.BackHome();//123临时版本注释掉 上海
 }