1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.Networking;
- using UnityEngine.UI;
- using XRTool.Util;
- public class test : UnitySingleton<test>
- {
- AndroidJavaObject jo;
- protected override void Awake()
- {
- base.Awake();
- AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
- jo = jc.GetStatic<AndroidJavaObject>("currentActivity");
- }
- public void CallAndroidImage()
- {
- jo.Call("startPhoto", "image/*");
- }
- public void CallAndroidVideo()
- {
- jo.Call("startPhoto", "video/*");
- }
- public static string path = "";
- public void message(string str)
- {
- Debug.Log("安卓传来信息:" + str);
- path = str;
- //StartCoroutine(LoadTexturePreview("file://" + str));
- WSHandler.Rtc.uploadCert();
- if (RoomMainForms.Instance)
- {
- RoomMainForms.Instance.ClickOnCanel();
- }
- }
- }
|