using UnityEngine; using System.Collections; using System; namespace ETModel { namespace com.commsdk.unity3d { public class AndroidImpl : CommSDKImpl { private AndroidJavaObject currActivity; public AndroidImpl(string callbackObj, string callbackMethod) { currActivity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic("currentActivity"); InitSDK(callbackObj, callbackMethod); } private string WxAppId = "wxe3784691d154266f"; private string WxAppSecret = "e11c9277651822d48a00425d4ffc08e2"; public override void InitSDK(string callbackObj, string callbackMethod) { if (currActivity != null) { currActivity.Call("initSdk", callbackObj, callbackMethod, WxAppId, WxAppSecret); } } /// /// Authorize the specified platform. /// public override void Authorize(int type, int reqID) { if (currActivity != null) { currActivity.Call("authorize", type, reqID); } } } } }