protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.activity_main);
            //Define buttons
            btnSignIn              = FindViewById <Button>(Resource.Id.hwid_signin);
            btnSignInCode          = FindViewById <Button>(Resource.Id.hwid_signInCode);
            btnSilentSignIn        = FindViewById <Button>(Resource.Id.hwid_silentSignIn);
            btnStartSmsManager     = FindViewById <Button>(Resource.Id.hwid_startSmsManager);
            btnCancelAuthorization = FindViewById <Button>(Resource.Id.hwid_cancelAuthorization);
            btnSignOut             = FindViewById <Button>(Resource.Id.hwid_signout);

            //Set Click event to buttons
            btnSignIn.Click              += BtnSignIn_Click;
            btnSignInCode.Click          += BtnSignInCode_Click;
            btnSilentSignIn.Click        += BtnSilentSignIn_Click;
            btnStartSmsManager.Click     += BtnStartSmsManager_Click;
            btnCancelAuthorization.Click += BtnCancelAuthorization_Click;
            btnSignOut.Click             += BtnSignOut_Click;
            FindViewById(Resource.Id.hwid_huawei_button).Click += BtnHwidHuawei_Click;
            //Create instance of Broadcast Receiver for sms read service
            mySMSBroadcastReceiver = new MySMSBroadcastReceiver();

            /*Obtain App Hash Key by AppHashKeyHelper for validation sms format
             * https://developer.huawei.com/consumer/en/doc/development/HMS-References/account-readsmsmanager#messagerule
             */
            var appHashKey = AppHashKeyHelper.GetAppHashKey(this);

            //sample log Please ignore
            AddLogFragment();

            //check permissions
            CheckPermission(new string[] { Android.Manifest.Permission.Internet,
                                           Android.Manifest.Permission.AccessNetworkState,
                                           Android.Manifest.Permission.ReadSms,
                                           Android.Manifest.Permission.ReceiveSms,
                                           Android.Manifest.Permission.SendSms,
                                           Android.Manifest.Permission.BroadcastSms }, 100);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_sms_test);

            var txtHashKey = FindViewById <TextView>(Resource.Id.txtHashKey);

            txtHashKey.Text = AppHashKeyHelper.GetAppHashKey(this);

            var btnWaitSms = FindViewById(Resource.Id.btnWaitSms);

            btnWaitSms.Click += btnWaitSmsOnClick;

            var intentFilter = new IntentFilter();

            intentFilter.AddAction(SmsRetriever.SmsRetrievedAction);
            RegisterReceiver(_receiver, intentFilter);
            _receiver.SmsCodeReceived += receiver_SmsCodeReceived;

            txtCode = FindViewById <TextView>(Resource.Id.txtCode);
        }