JLChen
2020-06-04 6d55af8792cf8fbef0055e677b900fc352dba9a2
SmartHome/ON/Application.cs
@@ -56,7 +56,7 @@
            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,
@@ -129,7 +129,7 @@
                    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;
@@ -144,14 +144,14 @@
#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 (() => {
@@ -159,7 +159,7 @@
                //        System.Threading.Thread.Sleep (50);
                //    }
                MqttCommon.DisConnectRemoteMqttClient ();
                    checkSomeInfo ();
                checkSomeInfo ();
                Console.WriteLine ("Close OnResumeAction!!!");
                WiFiSet.refreshView?.Invoke ();
            };
@@ -281,7 +281,7 @@
        "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
    {
@@ -302,9 +302,8 @@
                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) {
@@ -313,7 +312,7 @@
                        context.StartActivity (tempIntent);
                    } else {
                        (Shared.Application.Activity as BaseActivity).MoveToFront ();
                        RemoteInfo.Current.ReadMsgList ( false);
                        RemoteInfo.Current.ReadMsgList (false);
                    }
                } else {
                    Console.WriteLine ("极光推送!!!");