| | |
| | | Locale locale1 = Locale.Default; |
| | | var localeList = Resources.Configuration.Locale; |
| | | //if(localeList.Language == "zh") { |
| | | //Language.CurrentLanguage = "Chinese"; |
| | | //Language.CurrentLanguage = "Chinese"; |
| | | //} |
| | | |
| | | string [] permissions = new string [] { Manifest.Permission.WriteExternalStorage, Manifest.Permission.RecordAudio, |
| | |
| | | while (string.IsNullOrEmpty (tokenID)) { |
| | | System.Threading.Thread.Sleep (1000); |
| | | tokenID = JPushInterface.GetRegistrationID (activity); |
| | | Console.WriteLine ("Sleep.tokenID + "+ JPushInterface.GetRegistrationID (activity)); |
| | | Console.WriteLine ("Sleep.tokenID + " + JPushInterface.GetRegistrationID (activity)); |
| | | loadTokenCount++; |
| | | if (loadTokenCount > 30) { |
| | | break; |
| | |
| | | #endif |
| | | |
| | | BaseActivity.NetworkStateChanged += (int obj) => { |
| | | MqttCommon.DisConnectRemoteMqttClient("NetworkStateChanged") ; |
| | | MqttCommon.DisConnectRemoteMqttClient ("NetworkStateChanged"); |
| | | Shared.SimpleControl.EquipmentPublicClass.CheckLinkRemote (obj); |
| | | }; |
| | | |
| | | |
| | | }; |
| | | BaseActivity.RefreshUIAction += (activity) => { |
| | | MainPage.Show (); |
| | | checkSomeInfo (); |
| | | checkSomeInfo (); |
| | | }; |
| | | BaseActivity.OnResumeAction += (activity) => { |
| | | //new System.Threading.Thread (() => { |
| | |
| | | // System.Threading.Thread.Sleep (50); |
| | | // } |
| | | MqttCommon.DisConnectRemoteMqttClient (); |
| | | checkSomeInfo (); |
| | | checkSomeInfo (); |
| | | Console.WriteLine ("Close OnResumeAction!!!"); |
| | | WiFiSet.refreshView?.Invoke (); |
| | | }; |
| | |
| | | "cn.jpush.android.intent.NOTIFICATION_OPENED", |
| | | "cn.jpush.android.intent.CONNECTION" |
| | | }, |
| | | Categories = new string [] { "com.hdl.on" }) |
| | | Categories = new string [] { "com.hdl.in" }) |
| | | ] |
| | | public class JpushNotificationReceiver : BroadcastReceiver |
| | | { |
| | |
| | | else if (JPushInterface.ActionRegistrationId == intent.Action) { |
| | | string regId = bundle.GetString (JPushInterface.ExtraRegistrationId); |
| | | //System.Console.WriteLine ("Registration ID:" + regId); |
| | | } |
| | | else if (JPushInterface.ActionNotificationOpened == intent.Action) { |
| | | Console.WriteLine ("用户点击打开了通知"); |
| | | } else if (JPushInterface.ActionNotificationOpened == intent.Action) { |
| | | Console.WriteLine ("用户点击打开了通知"); |
| | | Application.IsShowTip = false; |
| | | |
| | | if (Shared.Application.Activity == null) { |
| | |
| | | context.StartActivity (tempIntent); |
| | | } else { |
| | | (Shared.Application.Activity as BaseActivity).MoveToFront (); |
| | | RemoteInfo.Current.ReadMsgList ( false); |
| | | RemoteInfo.Current.ReadMsgList (false); |
| | | } |
| | | } else { |
| | | Console.WriteLine ("极光推送!!!"); |