资源简介
unity 微信sdk接入之Android版,通过打jar包供unity调用,分为两个工程,一个unity工程,一个AndroidStudio工程。可改包名直接打包供unity用,微信sdk要包名,appid,签名一致才能调起
代码片段和文件信息
using UnityEngine;
using System.Collections;
using System;
using LitJson;
public class WeChatTest : MonoBehaviour {
JsonData json = new JsonData();
public bool session;
// Use this for initialization
void Start () {
// // example2: Stopwatch class
// System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
// sw.Start();
// for (int i = 0; i < 10; i++) {
// Texture dd = (Texture)Resources.Load(“CardType “ + i);
// }
// sw.Stop();
// TimeSpan ts2 = sw.Elapsed;
// NGUIDebug.Log (“tongyong_di “ + ts2.TotalMilliseconds.ToString ());
Debug.Log(“{\“type\“ = 3 \“url\“ = \“www.baide.com\“ \“title\“ = \“标题\“\“description\“ = \“百度大法好\“}“);
AndroidJavaClass jc = new AndroidJavaClass(“com.unity3d.player.UnityPlayer“);
AndroidJavaobject jo = jc.GetStaticject>(“currentActivity“);
jo.Call(“RegisterToWeChat“““); //填写appid
}
public void CallBack(string str)
{
NGUIDebug.Log (str);
}
public void ShareUrl()
{
json.Clear ();
json [“type“] = 3;
json [“url“] = “http://weibo.com/u/1235764025?refer_flag=1001030102_“;
json [“title“] = “饭太黏“;
json [“description“] = “饭太黏最帅“;
json [“isCircleOfFriends“] = session;
Share ();
// AndroidJavaClass jc = new AndroidJavaClass(“com.unity3d.player.UnityPlayer“);
// AndroidJavaobject jo = jc.GetStaticject>(“currentActivity“);
// jo.Call(“WeChat“ json)//“{\“type\“ = 3 \“url\“ = \“www.baide.com\“ \“title\“ = \“标题\“\“description\“ = \“百度大法好\“}\“isCircleOfFriends\“ = \“true\““);
}
public void ShareText()
{
json.Clear ();
json [“type“] = 4;
json [“title“] = “饭太黏“;
json [“description“] = “饭太黏最帅“;
json [“text“] = “饭太黏最帅text“;
json [“isCircleOfFriends“] = session;
Share ();
}
public void ShareMusic()
{
json.Clear ();
json [“type“] = 5;
json [“url“] = “http://music.163.com/m/song?id=110771&userid=6725175#?thirdfrom=qq“;
json [“title“] = “饭太黏“;
json [“description“] = “饭太黏最帅“;
json [“isCircleOfFriends“] = session;
Share ();
}
public void ShareVideo()
{
json.Clear ();
json [“type“] = 6;
json [“url“] = “http://www.qq.com“;
json [“title“] = “饭太黏“;
json [“description“] = “饭太黏最帅“;
json [“isCircleOfFriends“] = session;
Share ();
}
public void ShareImage()
{
json.Clear ();
json [“type“] = 7;
json [“title“] = “饭太黏“;
json [“description“] = “饭太黏最帅“;
json [“isCircleOfFriends“] = session;
Share ();
}
public void Selected(bool isSelect)
{
session = isSelect;
Debug.Log (isSelect);
}
void Share()
{
AndroidJavaClass jc = new AndroidJavaClass(“com.unity3d.player.UnityPlayer“);
AndroidJavaobject jo = jc.GetStaticject>(“currentActivity“);
jo.Call(“WeChat“ json.ToJson());
jo.Call (“StartAc“ “dddd0“);
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-10-08 23:10 微信sdk调用\
目录 0 2017-10-08 23:10 微信sdk调用\buildAppTest\
文件 17651 2017-05-01 23:18 微信sdk调用\buildAppTest\Assembly-CSharp-Editor.csproj
文件 18634 2017-10-08 23:07 微信sdk调用\buildAppTest\Assembly-CSharp.csproj
目录 0 2017-10-08 23:10 微信sdk调用\buildAppTest\Assets\
文件 50176 2007-10-04 15:51 微信sdk调用\buildAppTest\Assets\LitJson.dll
文件 468 2017-05-01 01:01 微信sdk调用\buildAppTest\Assets\LitJson.dll.me
目录 0 2017-10-08 23:10 微信sdk调用\buildAppTest\Assets\NGUI\
文件 192 2017-04-24 23:01 微信sdk调用\buildAppTest\Assets\NGUI.me
目录 0 2017-10-08 23:10 微信sdk调用\buildAppTest\Assets\NGUI\Editor\
文件 192 2017-04-24 23:01 微信sdk调用\buildAppTest\Assets\NGUI\Editor.me
文件 522240 2016-02-11 06:35 微信sdk调用\buildAppTest\Assets\NGUI\Editor\FreeType.dll
文件 133 2017-04-24 23:00 微信sdk调用\buildAppTest\Assets\NGUI\Editor\FreeType.dll.me
文件 1089968 2016-02-11 06:34 微信sdk调用\buildAppTest\Assets\NGUI\Editor\FreeType.dylib
文件 133 2017-04-24 23:00 微信sdk调用\buildAppTest\Assets\NGUI\Editor\FreeType.dylib.me
文件 630647 2016-02-11 06:35 微信sdk调用\buildAppTest\Assets\NGUI\Editor\FreeType64.dll
文件 133 2017-04-24 23:00 微信sdk调用\buildAppTest\Assets\NGUI\Editor\FreeType64.dll.me
目录 0 2017-10-08 23:10 微信sdk调用\buildAppTest\Assets\NGUI\Editor\Preview\
文件 192 2017-04-24 23:01 微信sdk调用\buildAppTest\Assets\NGUI\Editor\Preview.me
文件 15578 2016-02-11 06:34 微信sdk调用\buildAppTest\Assets\NGUI\Editor\Preview\Control - Background.png
文件 1166 2017-04-24 23:00 微信sdk调用\buildAppTest\Assets\NGUI\Editor\Preview\Control - Background.png.me
文件 18984 2016-02-11 06:34 微信sdk调用\buildAppTest\Assets\NGUI\Editor\Preview\Control - Colored Button.png
文件 1166 2017-04-24 23:00 微信sdk调用\buildAppTest\Assets\NGUI\Editor\Preview\Control - Colored Button.png.me
文件 18520 2016-02-11 06:34 微信sdk调用\buildAppTest\Assets\NGUI\Editor\Preview\Control - Colored Checkbox.png
文件 1166 2017-04-24 23:00 微信sdk调用\buildAppTest\Assets\NGUI\Editor\Preview\Control - Colored Checkbox.png.me
文件 8328 2016-02-11 06:34 微信sdk调用\buildAppTest\Assets\NGUI\Editor\Preview\Control - Colored Horizontal Scroll Bar.png
文件 1166 2017-04-24 23:00 微信sdk调用\buildAppTest\Assets\NGUI\Editor\Preview\Control - Colored Horizontal Scroll Bar.png.me
文件 4875 2016-02-11 06:34 微信sdk调用\buildAppTest\Assets\NGUI\Editor\Preview\Control - Colored Popup List.png
文件 1166 2017-04-24 23:00 微信sdk调用\buildAppTest\Assets\NGUI\Editor\Preview\Control - Colored Popup List.png.me
文件 13110 2016-02-11 06:33 微信sdk调用\buildAppTest\Assets\NGUI\Editor\Preview\Control - Colored Progress Bar.png
文件 1166 2017-04-24 23:00 微信sdk调用\buildAppTest\Assets\NGUI\Editor\Preview\Control - Colored Progress Bar.png.me
............此处省略8721个文件信息
- 上一篇:TFIDF java实现 语料库
- 下一篇:java-酒店管理系统-毕业设计
评论
共有 条评论