App push function Everyone should know, at present, the main Baidu, Aurora and other companies to provide push services, the following is a simple implementation of the Aurora push API push notification function.
After registering for the Aurora account, you can create an app that will get Appkey and Mastersecret two main parameters, which is the equivalent of our mobile phone number, used to connect the push ID.
Private string Sendpush (int type)
{
string result = ""; //Return results
String App_key = "Your Appkey";
String Master_secret = "Your Mastersecret";
int time_to_live = 86400; //life cycle, units in seconds
string os = "Android|ios"; //Can be as long as Android or iOS
string title = "title"; //Select Fill
String content = "Contents"; //required, less than 70 words
Jpush.jpushclient client = new Jpush.jpushclient (App_key, Master_secret, time_to_live);
Switch (type)
{
Case 0: //All users sent to the device
result = Client.sendnotificationbyappkey (9, "des", title, Content, OS, "", "" );
Break
Case 1: //Send to the device User ID 888 User (if issued to multiple IDs, can be separated by "," number, such as "888,999,000", limited to 1000, the official documents are described)
result = Client.sendnotificationbyalias ("888", 9, "des", title, Content, OS, " ", "" );
Break
Case 2: //Sent to users of category Level8
result = Client.sendnotificationbytag ("Level8", 9, "des", title, Content, OS, " ", "" );
Break
}
return result;
}
JPUSH.DLL,:HTTP://PAN.BAIDU.COM/S/1I3KP15B is used here.
Aurora Official Website: https://www.jpush.cn/
The above is the use of Jpush API (C #), as for the development of mobile phones, the official has a relevant document case.
Above from Mojocube's blog address: http://blog.csdn.net/mojocube/article/details/47212087
C # Simple Jpush (Aurora push) API for push functionality (blog from Mojocube)