Пример #1
0
    /// <summary>
    /// 分享到朋友圈
    /// </summary>
    public void WXShareToFriends(string url, string title, string des)
    {
        if (!HaveWXApp())
        {
            //MiniHintWindow.ShowHint("UI/HotUpdateWindow/NoWX");
            return;
        }

        WXLoginSDKClass.GetCurrentAndroidJavaObject().Call("SdkScenetimeline", "https://www.taptap.com/app/163003", "test", "测试");
    }
Пример #2
0
    /// <summary>
    /// 消息1 的监听, 获得订单信息,然后调支付sdk
    /// </summary>
    private void IndentListener(string prepayid, string nonceStr, string timeStamp, string sign)
    {
        //Debug.LogWarning("get WXpay----message-----" );
        //Debug.LogWarning("prepayid====" + prepayid);
        //Debug.LogWarning("nonceStr====" + nonceStr);
        //Debug.LogWarning("timeStamp====" + timeStamp);
        //Debug.LogWarning("sign====" + sign);

        //WXPay  参数: prepayid(交易会话ID) , nonceStr(随机字符串), timeStamp(北京时间戳), sign (签名)
        WXLoginSDKClass.GetCurrentAndroidJavaObject().Call("WXPay", prepayid, nonceStr, timeStamp, sign);
        //GetCurrentAndroidJavaObject().Call("WXPay2", prepayid);
    }
Пример #3
0
    IEnumerator RecordFrame()
    {
        yield return(new WaitForEndOfFrame());

        var texture = ScreenCapture.CaptureScreenshotAsTexture();

        // do something with texture

        byte[] bytes = ScreenCapture.CaptureScreenshotAsTexture(0).EncodeToPNG();
        WXLoginSDKClass.GetCurrentAndroidJavaObject().Call("SdkScreenshotToCircle", bytes);

        // cleanup
        Object.Destroy(texture);
    }
Пример #4
0
 /// <summary>
 /// 是否安装了微信客户端
 /// </summary>
 /// <returns></returns>
 public static bool HaveWXApp()
 {
     return(WXLoginSDKClass.GetCurrentAndroidJavaObject().Call <bool>("IsWXAppInstalle"));
 }