zoukankan      html  css  js  c++  java
  • .net core 集成极光推送

    登录极光推送 

    创建应用

    appkey和master secret在推送时会使用

    设置推送

    使用手机扫描二维码安装apk

    下载dll

    测试

    using Jiguang.JPush;
    using Jiguang.JPush.Model;
    using System;
    using System.Collections.Generic;
    
    namespace JpushExample
    {
        class Program
        {
            private static JPushClient client = new JPushClient("appKey", "masterSecret");
            static void Main(string[] args)
            {
                PushPayload pushPayload = new PushPayload()
                {
                    Platform = new List<string> { "android", "ios" },
                    Audience = "all",
                    Notification = new Notification
                    {
                        Alert = "hello jpush",
                        Android = new Android
                        {
                            Alert = "android alert",
                            Title = "title"
                        },
                        IOS = new IOS
                        {
                            Alert = "ios alert",
                            Badge = "+1"
                        }
                    },
                    Message = new Message
                    {
                        Title = "message title",
                        Content = "message content",
                        Extras = new Dictionary<string, string>
                        {
                            ["key1"] = "value1"
                        }
                    },
                    Options = new Options
                    {
                        IsApnsProduction = true // 设置 iOS 推送生产环境。不设置默认为开发环境。
                    }
                };
                var response = client.SendPush(pushPayload);
                Console.WriteLine(response.Content);
                Console.WriteLine("Hello World!");
                Console.Read();
            }
    

      

  • 相关阅读:
    ural 1227 dfs判环&求最长路
    uva 11990 块状链表
    图论·二分图
    图论·双连通分量
    图论·欧拉迹
    组合博弈
    解题策略·状态精简
    组合计数·棋盘统计
    组合计数·图形统计
    组合计数·经典序列问题
  • 原文地址:https://www.cnblogs.com/Justsoso-WYH/p/10550582.html
Copyright © 2011-2022 走看看