Beispiel #1
0
 private LoginStatus ForgotPassword(string authkey, string email, string deviceid)
 {
     LoginStatus status;
     if (validation.ValidateEmail(email))
     {
         string jsonInput = "{\"emailid\":\"" + email + "\",\"deviceid\":\"" + deviceid + "\",\"authtoken\":\"" + AppConfig.Auth_Token + "\"}";
         var loginJson = ServerCommunication.ServerCallWebRequest(AppConfig.URL_FORGOT_PASSWORD, jsonInput);
         LoginResponse loginResponse = JsonConvert.DeserializeObject<LoginResponse>(loginJson);
         response = loginResponse.Response;
         if (loginResponse.Response.status == "success")
         {
             status = LoginStatus.PASSWORD_SEND_SUCCESSFULL;
         }
         else
         {
             status = LoginStatus.PASSWORD_SEND_FAILED;
         }
     }
     else
     {
         status = LoginStatus.INVALID_CREDENTIAL;
     }
     return status;
 }
Beispiel #2
0
        private CatalogStatus getVideos(int categoryId, int subcategoryId)
        {
            CatalogStatus status;
            var authkey = AppConfig.Auth_Token;

            if (categoryId == 1)
            {
                ColorDrawable colorDrawable = new ColorDrawable(Android.Graphics.Color.Rgb(255, 0, 0));
                ActionBar.SetBackgroundDrawable(colorDrawable);
            }
            else if (categoryId == 2)
            {
                ColorDrawable colorDrawable = new ColorDrawable(Android.Graphics.Color.Rgb(0, 128, 255));
                ActionBar.SetBackgroundDrawable(colorDrawable);
            }
            else if (categoryId == 3)
            {
                ColorDrawable colorDrawable = new ColorDrawable(Android.Graphics.Color.Rgb(174, 180, 4));
                ActionBar.SetBackgroundDrawable(colorDrawable);
            }

            subcategoryId = 0;
            string jsonInput = "{\"categoryid\":\"" + categoryId + "\",\"subcategoryid\":\"" + subcategoryId + "\",\"authtoken\":\"" + AppConfig.Auth_Token + "\"}";
            var catalogJson = ServerCommunication.ServerCallWebRequest(AppConfig.URL_GET_VIDEOS, jsonInput);
            catalogResponse = JsonConvert.DeserializeObject<CatalogResponse>(catalogJson);
            response = catalogResponse.Response;

            if (catalogResponse.Response.status == "success")
            {
                status = CatalogStatus.SUCCESS;
            }
            else
            {
                status = CatalogStatus.FAILED;
            }
            return status;
        }