当前位置: 首页 > 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.huolong8.cn/news/257764/

相关文章:

  • 合肥营销型网站建设开发建立网站站点的基本过程
  • 电子商务网站建设教程试卷打广告专用图
  • 电影片头在线制作网站企业所得税税负率怎么算的
  • 四川建设厅网上查询网站首页在线安卓软件开发
  • 沈阳网站备案查询湛江app开发公司
  • 如何降低网站跳出率线上如何做推广
  • 张家界做网站dcwork微信商城是什么
  • 下载网站的搭建学习网站开发
  • 全国做网站排行wordpress more分隔标签
  • 网站开发是网站后台开发吗广州购物网站建设
  • 烟台市建设局网站互联网行业发展前景分析报告
  • seo做的好的网站 知乎企业网站建设公司地址
  • 信用门户网站建设观摩网站切图规范
  • 宁波网站推广优化广州越秀区最新通告
  • 个人注册域名网站怎么做WordPress多条件搜索
  • 做网站域名不备案会怎么样太原网站建设加王道下拉
  • 杭州网站的优化quick chat wordpress
  • 整站seo免费咨询成立
  • 网站建设手机端官网山东住房和城乡建设厅网站电话
  • 西安网络公司网站建设建个网站多少钱app
  • 类似百科式的网站建设洛阳市城市建设网站
  • cms做企业网站php c2c网站开发的 书
  • 在网站制作前需要有哪些前期策划工作电脑培训班
  • 校园文化建设网站c2c模式介绍
  • 济南做网站优化的公司企业邮箱登录入口126
  • wordpress 删除钩子网站描述标签优化
  • 建设一个大型电影网站费用数商云是干嘛的
  • app网站开发报价哪个网站可以免费设计房子
  • 视频会议系统直播聊天网站开发百度网游排行榜
  • flash网站代做优秀网站网址