Beispiel #1
0
        public bool IsOperatingSystemSupported(int majorVersion, int minorVersion)
        {
            try
            {
                double.TryParse(Build.VERSION.Release, out double sdkInt);

                return(sdkInt >= (majorVersion + minorVersion * .1));
            }
            catch (Exception e)
            {
                MobileCenterHelpers.Log(e);
                return(false);
            }
        }
        public async Task <bool> CheckLogin(string username, string password)
        {
            string _username = null;
            string _password = null;

            try
            {
                _username = await BlobCache.UserAccount.GetObject <string>("username");
            }
            catch (Exception e)
            {
                MobileCenterHelpers.Log(e);
                return(false);
            }

            try
            {
                _password = await BlobCache.UserAccount.GetObject <string>("password");
            }
            catch (Exception e)
            {
                MobileCenterHelpers.Log(e);
                return(false);
            }

            if (_username == null || _password == null)
            {
                return(false);
            }

            if (password == _password &&
                username == _username.ToString())
            {
                return(true);
            }

            return(false);
        }