| | |
| | | try { |
| | | var recevieResult = requestWeb (mess, "https://developer.hdlcontrol.com/api/GetOnePushMsg"); |
| | | var obj = Newtonsoft.Json.JsonConvert.DeserializeObject<PushMessageResult> (recevieResult); |
| | | if (obj.StateCode == "SUCCESS") { |
| | | if (obj.StateCode.ToUpper() == StateCode.SUCCESS) { |
| | | var msgEntity = Newtonsoft.Json.JsonConvert.DeserializeObject<List<MessageInfoRes>> (obj.ResponseData.ToString ()); |
| | | if (msgEntity.Count == 0) { |
| | | Application.RunOnMainThread (() => { |
| | |
| | | var gateWay = Newtonsoft.Json.JsonConvert.DeserializeObject<OnePortWirelessFR> (gateWayString); |
| | | mac = gateWay.MAC.Replace (".", ""); |
| | | return mac; |
| | | } else if (common.Type == DeviceType.OnePortMqttFR) { |
| | | var gateWay = Newtonsoft.Json.JsonConvert.DeserializeObject<OnePortMqttFR> (gateWayString); |
| | | mac = gateWay.MAC.Replace (".", ""); |
| | | return mac; |
| | | } else if (common.Type == DeviceType.OnePortBus) { |
| | | var gateWay = Newtonsoft.Json.JsonConvert.DeserializeObject<OnePortBus> (gateWayString); |
| | | mac = gateWay.MAC.Replace (".", ""); |
| | |
| | | try { |
| | | var recevieResult = requestWeb (mess, "https://developer.hdlcontrol.com/api/AddPushMessage"); |
| | | var obj = Newtonsoft.Json.JsonConvert.DeserializeObject<PushMessageResult> (recevieResult); |
| | | if (obj.StateCode == "SUCCESS") { |
| | | if (obj.StateCode.ToUpper() == StateCode.SUCCESS) { |
| | | Application.RunOnMainThread (() => { |
| | | new Tip () { MaxWidth = 150, Text = Language.StringByID (R.MyInternationalizationString.SendNotificationsSuccessfully), Direction = AMPopTipDirection.Down, CloseTime = 2 }.Show (btn); |
| | | }); |