C # Simple Jpush (Aurora push) API for push functionality (blog from Mojocube)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.