| | |
| | | * @param json
|
| | | * @return
|
| | | */
|
| | | public static int singlePushXiaoMi(MessageInfo info, JSONObject json, PushRecord pushRecord) {
|
| | | public static int singlePushXiaoMi(MessageInfo info, JSONObject json,List<String> regIds, PushRecord pushRecord) {
|
| | | // if (Constant.IS_TEST)
|
| | | // return 1;
|
| | |
|
| | | JSONObject mapXm = JSONObject.fromObject(json);
|
| | |
|
| | | String android = XiaoMiPushUtil.singlePushAndroidForXM(info, mapXm,regIds, null);
|
| | |
|
| | | LogHelper.userInfo("安卓推送测试:" + android);
|
| | | pushRecord.setAndroidPushId(android);
|
| | |
|
| | | if (android != null) {
|
| | | return 1;
|
| | | } else {
|
| | | return 4;
|
| | | }
|
| | | }
|
| | |
|
| | | public static int singlePushXiaoMiByRegisterId(MessageInfo info, JSONObject json, PushRecord pushRecord,
|
| | | String regId) {
|
| | | if (Constant.IS_TEST)
|
| | | return 1;
|
| | |
|
| | | JSONObject mapXm = JSONObject.fromObject(json);
|
| | |
|
| | | String android = XiaoMiPushUtil.singlePushAndroidForXM(info, mapXm, null);
|
| | | List<String> regIdList = new ArrayList<>();
|
| | | regIdList.add(regId);
|
| | | String android = XiaoMiPushUtil.pushBatchAndroidForXM(info, mapXm, regIdList);
|
| | |
|
| | | LogHelper.userInfo("安卓推送测试:" + android);
|
| | | pushRecord.setAndroidPushId(android);
|