标签:
腾讯信鸽.NET SDK
- 建议使用nuget安装包,搜索“信鸽”即可
- 可以通过clone源码编译出dll文件后引入。注意项目使用vs2013
XingeApp xinge = new XingeApp("accessId", "secretKey");
Payload pl = new Payload("这是一个简单的alert");
Msg_IOS mios = new Msg_IOS(pl);
Msg_Android mandroid = new Msg_Android_TouChuan("测试", XinGeConfig.message_type_touchuan)
{
content = "测试"
};
xinge.PushToSingleDevice("DeviceToken", mandroid);
xinge.PushToSingleDevice("DeviceToken", mios, XinGeConfig.IOSENV_DEV);
xinge.PushToAccount("account", mandroid);
xinge.PushToAccount("account", mios, XinGeConfig.IOSENV_DEV);
xinge.PushAccountList(new List<string>() { "account1" ,"account2"}, mandroid);
xinge.PushAccountList(new List<string>() { "account1", "account2" }, mios, XinGeConfig.IOSENV_DEV);
xinge.PushAllDevice(mandroid);
xinge.PushAllDevice(mios,XinGeConfig.IOSENV_DEV);
xinge.pushTags(new List<string>() { "tag1", "tag1" }, "OR", mandroid);
xinge.pushTags(new List<string>() { "tag1", "tag1" }, "OR", mios, XinGeConfig.IOSENV_DEV);
xinge.QueryPushStatus(new List<string>() { "pushId1", "pushId1" });
xinge.QueryDeviceCount(new List<string>() { "pushId1", "pushId1" });
xinge.QueryTags(0, 100);
xinge.CancelTimingPush("pushId1");
var tags = new Dictionary<string, string>();
tags.Add("tag1", "token1");
xinge.BatchSetTag(tags);
xinge.BatchDelTag(new List<string>() { "tag1", "tag2" });
xinge.QueryTokenTags("deviceToken");
xinge.QueryTagTokenNum("tag");
from yeanzhi
2015/1/11
标签:
原文地址:http://www.cnblogs.com/yeanzhi/p/4216548.html