当前位置: 首页 > news >正文

公司向要做一个网站要怎么做班级网站做哪些方面

公司向要做一个网站要怎么做,班级网站做哪些方面,腾讯云1元域名,广州越秀区怎么样今天试用了极光推送API用它是因为#xff0c;大多数人说它的文档是最全的#xff0c;但是用过之后#xff0c;发现关于IOS的文档#xff0c;还是很不够#xff0c;导致走了一点弯路#xff01;特别是服务端的代码#xff1a;https://github.com/jpush/jpush-api-java-cl…今天试用了极光推送API用它是因为大多数人说它的文档是最全的但是用过之后发现关于IOS的文档还是很不够导致走了一点弯路特别是服务端的代码https://github.com/jpush/jpush-api-java-client  for javaJava代码JPushClient jpushClient   new JPushClient(masterSecret, appKey,  0, DeviceEnum.Android,  false);CustomMessageParams params   new CustomMessageParams();params.setReceiverType(ReceiverTypeEnum.TAG);params.setReceiverValue(tag);MessageResult msgResult  jpushClient.sendCustomMessage(msgTitle, msgContent, params,  null);LOG.debug( “responseContent – ”  msgResult.responseResult.responseContent);if (msgResult.isResultOK()) {LOG.info( “msgResult – ”  msgResult);LOG.info( “messageId – ”  msgResult.getMessageId());}  else {if (msgResult.getErrorCode()   0) {// 业务异常LOG.warn( “Service error – ErrorCode: ” msgResult.getErrorCode()   “, ErrorMessage: ” msgResult.getErrorMessage());}  else {// 未到达 JPushLOG.error( “Other excepitons – ” msgResult.responseResult.exceptionString);}}JPushClient jpushClient new JPushClient(masterSecret, appKey, 0, DeviceEnum.Android, false);CustomMessageParams params new CustomMessageParams();params.setReceiverType(ReceiverTypeEnum.TAG);params.setReceiverValue(tag);MessageResult msgResult jpushClient.sendCustomMessage(msgTitle, msgContent, params, null);LOG.debug(responseContent - msgResult.responseResult.responseContent);if (msgResult.isResultOK()) {LOG.info(msgResult - msgResult);LOG.info(messageId - msgResult.getMessageId());} else {if (msgResult.getErrorCode() 0) {// 业务异常LOG.warn(Service error - ErrorCode: msgResult.getErrorCode() , ErrorMessage: msgResult.getErrorMessage());} else {// 未到达 JPushLOG.error(Other excepitons - msgResult.responseResult.exceptionString);}}这是它的推送案例,只有android的没有IOS的附送ios的代码后来发现IOS完全不能试用sendCustomMessage这个方法.Java代码/****/package org.haoyi.push;import java.util.HashMap;import java.util.Map;import org.apache.log4j.Logger;import cn.jpush.api.JPushClient;import cn.jpush.api.common.DeviceEnum;import cn.jpush.api.push.IosExtras;import cn.jpush.api.push.MessageResult;import cn.jpush.api.push.NotificationParams;import cn.jpush.api.push.ReceiverTypeEnum;/*** author zfanxu**/public  class PushDemo {public  static  final  int MAX  Integer.MAX_VALUE /  2;public  static  final  int MIN  MAX /  2;private  static Logger LOG  Logger.getLogger(PushDemo. class);public  static  void main(String[] args) {JPushClient jpushClient   new JPushClient(Config.JPUSH_MASTER_SECRET,Config.JPUSH_APPKEY,  0, DeviceEnum.IOS,  false);for ( int i   0; i String notificationContent   “show me your money!”;NotificationParams param   new NotificationParams();param.setSendNo(getRandomSendNo());param.setReceiverType(ReceiverTypeEnum.REGISTRATION_ID);param.setReceiverValue( “071f06f8c18″);Map extras   new HashMap();IosExtras iosExtra   new IosExtras( 1,  “message.wav”); // badge// set badge and soundextras.put( “ios”, iosExtra);MessageResult msgResult  jpushClient.sendNotification(notificationContent, param, extras);if (msgResult.isResultOK()) {LOG.info( “msgResult – ”  msgResult);LOG.info( “messageId – ”  msgResult.getMessageId());}  else {if (msgResult.getErrorCode()   0) {// 业务异常LOG.warn( “Service error – ErrorCode: ” msgResult.getErrorCode()   “, ErrorMessage: ” msgResult.getErrorMessage());}  else {// 未到达 JPushLOG.error( “Other excepitons – ” msgResult.responseResult.exceptionString);}}}}/**** return sendNo*/public  static  int getRandomSendNo() {return ( int) (MIN  Math.random() * (MAX – MIN));}}/****/package org.haoyi.push;import java.util.HashMap;import java.util.Map;import org.apache.log4j.Logger;import cn.jpush.api.JPushClient;import cn.jpush.api.common.DeviceEnum;import cn.jpush.api.push.IosExtras;import cn.jpush.api.push.MessageResult;import cn.jpush.api.push.NotificationParams;import cn.jpush.api.push.ReceiverTypeEnum;/*** author zfanxu**/public class PushDemo {public static final int MAX Integer.MAX_VALUE / 2;public static final int MIN MAX / 2;private static Logger LOG Logger.getLogger(PushDemo.class);public static void main(String[] args) {JPushClient jpushClient new JPushClient(Config.JPUSH_MASTER_SECRET,Config.JPUSH_APPKEY, 0, DeviceEnum.IOS, false);for (int i 0; i 1; i) {String notificationContent show me your money!;NotificationParams param new NotificationParams();param.setSendNo(getRandomSendNo());param.setReceiverType(ReceiverTypeEnum.REGISTRATION_ID);param.setReceiverValue(071f06f8c18);Map extras new HashMap();IosExtras iosExtra new IosExtras(1, message.wav);// badge// set badge and soundextras.put(ios, iosExtra);MessageResult msgResult jpushClient.sendNotification(notificationContent, param, extras);if (msgResult.isResultOK()) {LOG.info(msgResult - msgResult);LOG.info(messageId - msgResult.getMessageId());} else {if (msgResult.getErrorCode() 0) {// 业务异常LOG.warn(Service error - ErrorCode: msgResult.getErrorCode() , ErrorMessage: msgResult.getErrorMessage());} else {// 未到达 JPushLOG.error(Other excepitons - msgResult.responseResult.exceptionString);}}}}/*** 保持 sendNo 的唯一性是有必要的 It is very important to keep sendNo unique.** return sendNo*/public static int getRandomSendNo() {return (int) (MIN Math.random() * (MAX - MIN));}}先挖个坑下班后再填满
http://www.sadfv.cn/news/257764/

相关文章:

  • 厦门市建设局综合业务平台网站建网站 找个人
  • html5 单页 响应式 网站模板iis 5 新建网站
  • 怎样建设自已的网站杭州清风室内设计培训学校
  • 阿里云编辑建设好的网站自己做视频网站
  • 阳谷网站建设网络推广哪个网站可以做兼职ppt
  • 四川城乡建设厅官方网站韶关市住房和城乡建设部网站
  • 招远水利建设工程公司网站如何开发wordpress主题
  • 做公众号必备的网站建设通app官网下载安装
  • 在网站怎么做代销建筑公司名称大全集最新免费
  • wordpress 百度搜索图片南通优普网站建设优化
  • php网站验证码错误丹东做网站公司
  • 化妆品电子商务网站建设规划书网页设计师面试
  • 做自己的网站给人的启发iis 建设网站
  • 红色系网站设计炫酷的wordpress插件
  • 美食网站二级页面模板做网站找哪家
  • 建筑专业网站有哪些双鸭山seo
  • 典型营销型网站有哪些合肥竞价推广
  • 建设网站公司联系方式做推广哪个网站好
  • 群晖做自己的电影网站如何查看网站是不是wordpress
  • seo站群系统wordpress标签打不开
  • 怎样保存网站资料做证据jquery 网站缩放
  • 濮阳市网站怎么做宣传wordpress加入弹窗红包
  • 兰州正规seo整站优化工具优秀软文范例800字
  • 网站开发后端工资多少建设网站查证书
  • 做百度推广和企业网站那个有效果吗深圳企业网站建设服务公司
  • 网站推广适合哪种公司做自己做的网站做登录
  • 建设银行春招网站渭南市工程建设项目审批网上办事大厅
  • 做网站外包多少钱在线做网站索引
  • 外贸自建站多少钱一个专业网站建设费用怎么算
  • 两学一做学习网站哪里找人做网站