Ejemplo n.º 1
0
        private async Task GetEmailCounts()
        {
            try
            {
                if (CrossConnectivity.Current.IsConnected)
                {
                    EmailCountResponse emailCount = await WebServiceMethods.
                                                    EmailCount(mSharedPreferencesManager.GetString(
                                                                   ConstantsDroid.USER_ID_PREFERENCE, ""));

                    if (emailCount != null)
                    {
                        mSharedPreferencesManager.PutCountResponse(emailCount);
                    }
                }
            }
            catch (Exception e)
            {
                CustomProgressDialog.HideProgressDialog();
                UtilityDroid.GetInstance().ShowAlertDialog(mActivity, Resources.GetString(Resource.String.error_alert_title),
                                                           Resources.GetString(Resource.String.alert_message_error),
                                                           Resources.GetString(Resource.String.alert_cancel_btn), Resources.GetString(Resource.String.alert_ok_btn));
            }
        }