예제 #1
0
        private async System.Threading.Tasks.Task CheckIfClientExistsAsync()
        {
            TaskCompletionListener clientExistsListener = new TaskCompletionListener();

            clientExistsListener.Succes  += ClientExistsListener_Succes;
            clientExistsListener.Failure += ClientExistsListener_Failure;
            progress = new ProgressDialog(this);
            progress.Indeterminate = false;
            progress.SetProgressStyle(Android.App.ProgressDialogStyle.Spinner);
            progress.SetMessage("Se efectueaza migrarea..Asteptati...");
            progress.SetCancelable(false);
            progress.Show();
            await System.Threading.Tasks.Task.Delay(5000);

            _firestoreDb.EnableNetwork();
            _firestoreDb.Collection("Medics").Document(medicSelected.Id).Collection("Clients").Document(clientLoggedData.Id).Get()
            .AddOnSuccessListener(clientExistsListener).AddOnFailureListener(clientExistsListener);
        }