| | |
| | | * @param cloudCallBeak - |
| | | */ |
| | | public void pushAdd(CloudCallBeak<String> cloudCallBeak) { |
| | | //游客模式不需要消息推送,因为手动杀死应用时,自动退出游客模式 |
| | | if (UserConfigManage.getInstance().isTourist_mode()) { |
| | | return; |
| | | } |
| | | String requestUrl = HttpApi.POST_push_add; |
| | | JsonObject json = new JsonObject(); |
| | | json.addProperty("deviceName", Build.MODEL);//设备名称 |
| | |
| | | json.addProperty("produce", AppConfigManage.isIsOnlineServer());//表示是否是正式服务器 |
| | | json.addProperty("pushToken", UserConfigManage.getInstance().getPushToken());//App的推送Token,在极光为RegId |
| | | json.addProperty("software", "PHOTOVOLTAIC");//也就云端说的通道号(channel) |
| | | // json.addProperty("platform", "ALIYUN_APNS");//阿里云的版本的platform |
| | | json.addProperty("platform", "FCM");//google的版本的platform |
| | | json.addProperty("platform", "ALIYUN_APNS");//阿里云的版本的platform |
| | | // json.addProperty("platform", "FCM");//google的版本的platform |
| | | json.addProperty("language", UserConfigManage.getInstance().getCurrentAppLanguage());//2.0追加的字段 |
| | | |
| | | HttpClient.getInstance().requestHttp(requestUrl, json.toString(), new CloudCallBeak<String>() { |