Exemplo n.º 1
0
        void OrganizedData(Java.Lang.Object value)
        {
            var snapshot = (QuerySnapshot)value;

            if (!snapshot.IsEmpty)
            {
                if (ListOfPost.Count > 0)
                {
                    ListOfPost.Clear();
                }

                foreach (DocumentSnapshot item in snapshot.Documents)
                {
                    Post post = new Post();
                    post.ID       = item.Id;
                    post.PostBody = item.Get("post_body") != null?item.Get("post_body").ToString() : "";

                    post.Author = item.Get("author") != null?item.Get("author").ToString() : "";

                    post.ImageId = item.Get("image_id") != null?item.Get("image_id").ToString() : "";

                    post.OwnerId = item.Get("owner_id") != null?item.Get("owner_id").ToString() : "";

                    post.DownloadUrl = item.Get("download_url") != null?item.Get("download_url").ToString() : "";

                    string datestring = item.Get("post_date") != null?item.Get("post_date").ToString() : "";

                    post.PostDate = DateTime.ParseExact(datestring, @"dd/MM/yyyy HH:mm:ss tt",
                                                        System.Globalization.CultureInfo.InvariantCulture);

                    var data = item.Get("likes") != null?item.Get("likes") : null;

                    if (data != null)
                    {
                        var dictionaryFromHashMap = new Android.Runtime.JavaDictionary <string, string>(data.Handle, JniHandleOwnership.DoNotRegister);

                        //retrieve our own id
                        string uid = AppDataHelper.GetFirebaseAuth().CurrentUser.Uid;

                        //check the number of users liked the post
                        post.LikeCount = dictionaryFromHashMap.Count;

                        //verifies if we liked the post or not.
                        if (dictionaryFromHashMap.Contains(uid))
                        {
                            post.Liked = true;
                        }
                    }

                    ListOfPost.Add(post);
                }

                OnPostRetrieved?.Invoke(this, new PostEventArgs {
                    Posts = ListOfPost
                });
            }
        }
Exemplo n.º 2
0
        public void FetchPost()
        {
            // retreive only Once

            //AppDataHelper.GetFirestore().Collection("posts").Get()
            //    .AddOnSuccessListener(this);

            AppDataHelper.GetFirestore().Collection("posts").AddSnapshotListener(this);
        }
Exemplo n.º 3
0
 private void Accept()
 {
     _tripRef.Child("status").SetValue("accepted");
     _tripRef.Child("driver_name").SetValue(AppDataHelper.GetFullname());
     _tripRef.Child("driver_phone").SetValue(AppDataHelper.GetPhone());
     _tripRef.Child("driver_location").Child("latitude").SetValue(_mLastlocation.Latitude);
     _tripRef.Child("driver_location").Child("longitude").SetValue(_mLastlocation.Longitude);
     _tripRef.Child("driver_id").SetValue(AppDataHelper.GetCurrentUser().Uid);
 }
        public void Create()
        {
            _editor = _preferences.Edit();
            FirebaseDatabase  database  = AppDataHelper.GetDatabase();
            string            driverId  = AppDataHelper.GetCurrentUser().Uid;
            DatabaseReference driverRef = database.GetReference("drivers/" + driverId);

            driverRef.AddValueEventListener(this);
        }
Exemplo n.º 5
0
        // on create method where we initialize the event handler
        public void Create()
        {
            editor = preferences.Edit();  // initialize the editor
            FirebaseDatabase  database  = AppDataHelper.GetDatabase();
            string            driverID  = AppDataHelper.GetCurrentUser().Uid;
            DatabaseReference driverRef = database.GetReference("drivers/" + driverID);

            driverRef.AddValueEventListener(this);
        }
Exemplo n.º 6
0
        //User is only assigned an id if the app has never been opened before
        private void InitializeNewUser()
        {
            DatabaseReference eek = AppDataHelper.GetDatabase().GetReference("users").Push();

            ThisUser.Id         = eek.Key;
            ThisUser.beginDate  = DateTime.Now.Day;
            ThisUser.beginMonth = DateTime.Now.Month;
            ThisUser.beginYear  = DateTime.Now.Year;
        }
Exemplo n.º 7
0
        public void Create()
        {
            editor = preferences.Edit();
            FirebaseDatabase  database         = AppDataHelper.GetDatabase();
            string            userId           = AppDataHelper.GetCurrentUser().Uid;
            DatabaseReference profileReference = database.GetReference("users/" + userId);

            profileReference.AddValueEventListener(this);
        }
Exemplo n.º 8
0
        public CreateRequestEventListener(NewTripDetails nNewTrip)
        {
            newTrip = nNewTrip;

            database = AppDataHelper.GetDatabase();

            RequestTimer.Interval = 1000;
            RequestTimer.Elapsed += RequestTimer_Elapsed;
        }
Exemplo n.º 9
0
        public override void OnViewCreated(View view, Bundle savedInstanceState)
        {
            base.OnViewCreated(view, savedInstanceState);
            var AccountTypeTGroup = view.FindViewById <MaterialButtonToggleGroup>(Resource.Id.drv_part_tggl_grp);
            var InfoImgSwitcher   = view.FindViewById <ImageSwitcher>(Resource.Id.drv_part_img_swtchr1);
            var InfoTSwitcher     = view.FindViewById <TextSwitcher>(Resource.Id.drv_part_txt_swtchr1);
            var ContinueBtn       = view.FindViewById <MaterialButton>(Resource.Id.drv_part_cnt_btn);

            InitSwitchers(InfoImgSwitcher, InfoTSwitcher);

            AccountTypeTGroup.AddOnButtonCheckedListener(new OnButtonChecked(id =>
            {
                switch (id)
                {
                case Resource.Id.drv_tggl_partner_btn:
                    partner = true;
                    InfoTSwitcher.SetText(GetString(Resource.String.partner_desc_txt));
                    InfoImgSwitcher.SetImageResource(Resource.Drawable.driver_pablo);
                    break;

                case Resource.Id.drv_tggl_driver_btn:
                    partner = false;
                    InfoTSwitcher.SetText(GetString(Resource.String.driving_desc_txt));
                    InfoImgSwitcher.SetImageResource(Resource.Drawable.driver_pablo);
                    break;
                }
            }));


            ContinueBtn.Click += (s1, e1) =>
            {
                if (AppDataHelper.GetCurrentUser() != null)
                {
                    OnboardingActivity.ShowProgressDialog();
                    var driverRef = AppDataHelper.GetDatabase().GetReference($"Drivers/{AppDataHelper.GetCurrentUser().Uid}");
                    driverRef.Child("isPartner").SetValue(partner.ToString())
                    .AddOnSuccessListener(new OnSuccessListener(r1 =>
                    {
                        driverRef.Child(StringConstants.StageofRegistration).SetValue(RegistrationStage.Capturing.ToString())
                        .AddOnSuccessListener(new OnSuccessListener(r2 =>
                        {
                            PartnerTypeComplete.Invoke(this, new PartnerEventArgs {
                                IsPartnerComplete = true
                            });
                            OnboardingActivity.CloseProgressDialog();
                        }))
                        .AddOnFailureListener(new OnFailureListener(e1 => { OnboardingActivity.CloseProgressDialog(); }));
                    }))
                    .AddOnFailureListener(new OnFailureListener(e1 => { OnboardingActivity.CloseProgressDialog(); }));
                }
                else
                {
                    Toast.MakeText(Activity, "Something aint right", ToastLength.Short).Show();
                }
            };
        }
Exemplo n.º 10
0
        private void SubmitButton_Click(object sender, EventArgs e)
        {
            HashMap postMap = new HashMap();

            postMap.Put("author", AppDataHelper.GetFullName());
            postMap.Put("owner_id", AppDataHelper.GetFirebaseAuth().CurrentUser.Uid);
            postMap.Put("post_date", DateTime.Now.ToString());
            postMap.Put("post_body", postEditText.Text);

            DocumentReference newPostRef = AppDataHelper.GetFirestore().Collection("posts").Document();
            string            postKey    = newPostRef.Id;

            postMap.Put("image_id", postKey);


            ShowProgressDialogue("Saving Information ...");

            // Save Post Image to Firebase Storaage
            StorageReference storageReference = null;

            if (fileBytes != null)
            {
                storageReference = FirebaseStorage.Instance.GetReference("postImages/" + postKey);
                storageReference.PutBytes(fileBytes)
                .AddOnSuccessListener(taskCompletionListeners)
                .AddOnFailureListener(taskCompletionListeners);
            }

            // Image Upload Success Callback
            taskCompletionListeners.Sucess += (obj, args) =>
            {
                if (storageReference != null)
                {
                    storageReference.DownloadUrl.AddOnSuccessListener(downloadUrlListener);
                }
            };

            // Image Download URL Callback
            downloadUrlListener.Sucess += (obj, args) =>
            {
                string downloadUrl = args.Result.ToString();
                postMap.Put("download_url", downloadUrl);

                // Save post to Firebase Firestore
                newPostRef.Set(postMap);
                CloseProgressDialogue();
                Finish();
            };


            // Image Upload Failure Callback
            taskCompletionListeners.Failure += (obj, args) =>
            {
                Toast.MakeText(this, "Upload was not completed", ToastLength.Short).Show();
            };
        }
Exemplo n.º 11
0
 private void _loadSetting()
 {
     Pager.FontFamily       = BookHelper.GetFont(AppDataHelper.GetValue("FontFamily", "方正启体简体"));
     Pager.CharacterSpacing = AppDataHelper.GetValue("CharacterSpacing", 300);
     Pager.LineHeight       = AppDataHelper.GetValue <double>("LineHeight", 36);
     Pager.FontSize         = AppDataHelper.GetValue <double>("FontSize", 30);
     Pager.Background       = AppDataHelper.GetValue("Background", new SolidColorBrush(ColorHelper.GetColor("#FFE9FAFF")));
     Pager.Foreground       = AppDataHelper.GetValue("Background", new SolidColorBrush(ColorHelper.GetColor("#FF555555")));
     Pager.SetProperty();
 }
Exemplo n.º 12
0
 void Accept()
 {
     statusEnum = RideStatusEnum.Accepted;
     tripRef.Child("status").SetValue($"{statusEnum}");
     tripRef.Child("driver_name").SetValue(AppDataHelper.Firstname);
     tripRef.Child("driver_phone").SetValue(AppDataHelper.Phone);
     tripRef.Child("driver_location").Child("latitude").SetValue(mLastlocation.Latitude);
     tripRef.Child("driver_location").Child("longitude").SetValue(mLastlocation.Longitude);
     tripRef.Child("driver_id").SetValue(AppDataHelper.GetCurrentUser().Uid);
 }
Exemplo n.º 13
0
        void InitializeFirebase()
        {
            //Firebase Init
            database    = AppDataHelper.GetDatabase();
            mAuth       = AppDataHelper.GetFirebaseAuth();
            currentUser = AppDataHelper.GetCurrentUser();

            FirebaseApp.InitializeApp(this);
            //storage = FirebaseStorage.Instance;
        }
Exemplo n.º 14
0
        public void OnSuccess(Java.Lang.Object result)
        {
            DocumentSnapshot snapshot = (DocumentSnapshot)result;

            if (snapshot.Exists())
            {
                string fullname = snapshot.Get("fullname").ToString();
                AppDataHelper.SaveFullName(fullname);
            }
        }
Exemplo n.º 15
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.newMember);
            fullName     = (TextInputLayout)FindViewById(Resource.Id.fullNameText);
            nic          = (TextInputLayout)FindViewById(Resource.Id.NICText);
            selectDate   = (Button)FindViewById(Resource.Id.selectBirthdayButton);
            email        = (TextInputLayout)FindViewById(Resource.Id.emailText);
            telephone    = (TextInputLayout)FindViewById(Resource.Id.phoneNumberText);
            submitButton = (Button)FindViewById(Resource.Id.newMemberSubmitButton);
            cancelButton = (Button)FindViewById(Resource.Id.newMemberSubmitCancelButton);
            selectedDate = (TextView)FindViewById(Resource.Id.selectedDateLabel);

            selectDate.Click   += SelectDate_Click;
            cancelButton.Click += delegate
            {
                StartActivity(typeof(MainActivity));
            };
            submitButton.Click += delegate
            {
                string fullNameText     = fullName.EditText.Text;
                string nicText          = nic.EditText.Text;
                string emailText        = email.EditText.Text;
                string telephoneText    = telephone.EditText.Text;
                string selectedDateText = selectDate.Text;

                HashMap memberInfo = new HashMap();
                memberInfo.Put("fullName", fullNameText);
                memberInfo.Put("NIC", nicText);
                memberInfo.Put("Email", emailText);
                memberInfo.Put("telephone Number", telephoneText);
                memberInfo.Put("Birthday", birthday);

                Android.App.AlertDialog.Builder saveMemberAlert = new Android.App.AlertDialog.Builder(this);
                saveMemberAlert.SetTitle("Save Alumni Info");
                saveMemberAlert.SetMessage("Are you sure?");
                saveMemberAlert.SetPositiveButton("Continue", (senderAlert, args) =>
                {
                    DatabaseReference newMemberRef = AppDataHelper.GetDatabase().GetReference("Member").Push();
                    newMemberRef.SetValue(memberInfo);
                    StartActivity(typeof(MainActivity));
                    this.Dispose();
                });
                saveMemberAlert.SetNegativeButton("Cancel", (senderAlert, args) =>
                {
                    saveMemberAlert.Dispose();
                });

                saveMemberAlert.Show();
            };

            //submitButton.Click += SubmitButton_Click;
            // Create your application here
        }
Exemplo n.º 16
0
        void OrganizeData(Java.Lang.Object Value)
        {
            var snapshot = (QuerySnapshot)Value;

            if (!snapshot.IsEmpty)
            {
                if (ListOfPost.Count > 0)
                {
                    ListOfPost.Clear();
                }

                foreach (DocumentSnapshot item in snapshot.Documents)
                {
                    Post post = new Post();
                    post.ID = item.Id;

                    post.PostBody = item.Get("post_body") != null?item.Get("post_body").ToString() : "";

                    post.Author = item.Get("author") != null?item.Get("author").ToString() : "";

                    post.ImageId = item.Get("image_id") != null?item.Get("image_id").ToString() : "";

                    post.OwnerId = item.Get("owner_id") != null?item.Get("owner_id").ToString() : "";

                    post.DownloadUrl = item.Get("download_url") != null?item.Get("download_url").ToString() : "";

                    string datestring = item.Get("post_date") != null?item.Get("post_date").ToString() : "";

                    post.PostDate = DateTime.Parse(datestring);


                    var data = item.Get("likes") != null?item.Get("likes") : null;

                    if (data != null)
                    {
                        var    dictionaryFromHashMap = new Android.Runtime.JavaDictionary <string, string>(data.Handle, JniHandleOwnership.DoNotRegister);
                        string uid = AppDataHelper.GetFirebaseAuth().CurrentUser.Uid;

                        post.LikeCount = dictionaryFromHashMap.Count;

                        if (dictionaryFromHashMap.Contains(uid))
                        {
                            post.Liked = true;
                        }
                    }

                    ListOfPost.Add(post);
                }

                OnPostRetrieved?.Invoke(this, new PostEventArgs {
                    Posts = ListOfPost
                });
            }
        }
Exemplo n.º 17
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Registration);
            mAuth = FirebaseAuth.GetInstance(AppDataHelper.GetAuth().App);
            FirebaseUser             user       = mAuth.CurrentUser;
            UserProfileChangeRequest profUpdate = new UserProfileChangeRequest.Builder().SetDisplayName(fullname).Build();

            ConnectControl();
        }
Exemplo n.º 18
0
        private void SavechangesButton_Click(object sender, EventArgs e)
        {
            string fullname   = fullnameText.EditText.Text;
            string department = departmentText.EditText.Text;
            string set        = setText.EditText.Text;

            AppDataHelper.GetDatabase().GetReference("alumini/" + thisAlunini.ID + "/fullname").SetValue(fullname);
            AppDataHelper.GetDatabase().GetReference("alumini/" + thisAlunini.ID + "/department").SetValue(department);
            AppDataHelper.GetDatabase().GetReference("alumini/" + thisAlunini.ID + "/set").SetValue(set);

            this.Dismiss();
        }
 protected override void OnCreate(Bundle savedInstanceState)
 {
     try
     {
         base.OnCreate(savedInstanceState);
         SetContentView(Resource.Layout.activity_Splash);
         firebaseAuth = AppDataHelper.GetFirebaseAuth();
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 20
0
        public override void OnViewCreated(View view, Bundle savedInstanceState)
        {
            var logoutBtn = view.FindViewById <MaterialButton>(Resource.Id.logout_btn);

            logoutBtn.Click += (s1, e1) =>
            {
                if (AppDataHelper.GetCurrentUser() != null)
                {
                    ShowDialog();
                }
            };
        }
        protected async override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_stats);
            this.Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);
            this.Window.ClearFlags(WindowManagerFlags.TranslucentStatus);
            this.Window.SetStatusBarColor(Android.Graphics.Color.ParseColor("#204060"));
            var toolbar = FindViewById <Toolbar>(Resource.Id.toolbarstats);

            SetSupportActionBar(toolbar);
            toolbar.SetNavigationOnClickListener(this);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetDisplayShowHomeEnabled(true);
            toolbar.NavigationIcon.SetColorFilter(Android.Graphics.Color.ParseColor("#04040C"), PorterDuff.Mode.SrcAtop);
            statstype           = FindViewById <TextView>(Resource.Id.statstype);
            statsdata           = FindViewById <TextView>(Resource.Id.statsdata);
            generatePDF         = FindViewById <Button>(Resource.Id.generatePDF);
            showbarchart        = FindViewById <ImageView>(Resource.Id.showbarchart);
            showbarchart.Click += Showbarchart_Click;
            showpiechart        = FindViewById <ImageView>(Resource.Id.showpiechart);
            showpiechart.Click += Showpiechart_Click;
            analysistype        = FindViewById <TextView>(Resource.Id.analysistype);
            analysistype.Text   = "Category-wise Expenses";
            //chartview = FindViewById<ChartView>(Resource.Id.chartview);
            monthcontainer         = FindViewById <RelativeLayout>(Resource.Id.monthcontainer);
            progressBarStats       = FindViewById <ProgressBar>(Resource.Id.progressBarStats);
            rootView               = FindViewById <CoordinatorLayout>(Resource.Id.rootView);
            monthspinner           = FindViewById <Spinner>(Resource.Id.monthspinner);
            CurrentUserUid         = Intent.GetStringExtra("CurrentUserUid");
            SelectedYear           = Intent.GetStringExtra("SelectedYear");
            SelectedMonth          = Intent.GetStringExtra("SelectedMonth");
            CurrentUserDisplayName = Intent.GetStringExtra("CurrentUserDisplayName");
            prefs = PreferenceManager.GetDefaultSharedPreferences(this);
            //statstype.Text = "Total expense for the year"+"("+ SelectedYear+")";
            piechartStats = FindViewById <MikePhil.Charting.Charts.PieChart>(Resource.Id.piechartStats);
            piechartStats.SetNoDataText("");

            barchartStats = FindViewById <MikePhil.Charting.Charts.BarChart>(Resource.Id.barchartStats);
            barchartStats.SetNoDataText("");
            barchartStats.Description.Enabled = false;
            barchartStats.AxisRight.SetDrawLabels(false);
            database          = AppDataHelper.GetDatabase();
            IsPieChartSeleted = true;
            SetupMonthSpinner();
            //FetchExpensesTableForMonth();

            // await Common.WriteFileToStorageAsync(this, "PlayfairDisplay-Regular.ttf");
            await Common.WriteFileToStorageAsync(this, "nunitosans.ttf");

            Dexter.WithActivity(this).WithPermission(Android.Manifest.Permission.WriteExternalStorage).WithListener(this).Check();
            generatePDF.Click -= GeneratePDF_Click;
            generatePDF.Click += GeneratePDF_Click;
        }
Exemplo n.º 22
0
        public async void Send(Models.Message message)
        {
            HashMap messageInfo = new HashMap();

            messageInfo.Put("sender", message.Sender);
            messageInfo.Put("content", message.Content);
            messageInfo.Put("time", message.Time);
            messageInfo.Put("date", message.Date);

            DatabaseReference messageReference = AppDataHelper.GetDatabase().GetReference("Chat").Push();
            await messageReference.SetValueAsync(messageInfo);
        }
Exemplo n.º 23
0
        public async Task <IActionResult> Index()
        {
            await AppDataHelper.CheckReagentsStockAsync(_context);

            if (!Request.Cookies.ContainsKey("reagentAlert"))
            {
                Response.Cookies.Append("reagentAlert", "true", new CookieOptions {
                    Expires = DateTime.Now.AddMinutes(10)
                });
            }
            return(View());
        }
Exemplo n.º 24
0
        public void UpdateLocation(Android.Locations.Location mylocation)
        {
            string DriverId = AppDataHelper.GetCurrentUser().Uid;

            if (availablityRef != null)
            {
                DatabaseReference locationref = database.GetReference("driversAvailable/" + DriverId + "/location");
                HashMap           locationMap = new HashMap();
                locationMap.Put("latitude", mylocation.Latitude);
                locationMap.Put("longitude", mylocation.Longitude);
                locationref.SetValue(locationMap);
            }
        }
Exemplo n.º 25
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     AddSlide(SampleSlide.NewInstance(Resource.Layout.Intro1));
     AddSlide(SampleSlide.NewInstance(Resource.Layout.Intro2));
     AddSlide(SampleSlide.NewInstance(Resource.Layout.Intro3));
     SetFlowAnimation();
     SetColorSkipButton(Color.ParseColor("#ffffff"));
     SetColorDoneText(Color.ParseColor("#ffffff"));
     SetNextArrowColor(Color.ParseColor("#204060"));
     SetIndicatorColor(Color.ParseColor("#204060"), Color.ParseColor("#bdd3e9"));
     firebaseAuth = AppDataHelper.GetFirebaseAuth();
 }
Exemplo n.º 26
0
 /// <summary>
 /// Migrates unused application data into their new alternatives if they exists.
 /// </summary>
 public static void Perform()
 {
     try
     {
         string topBarEnabled = "TopBarEnabled";
         if (ApplicationData.Current.LocalSettings.Values.ContainsKey(topBarEnabled))
         {
             AppDataHelper.TopBarVisibility = AppDataHelper.GetValue(true, topBarEnabled) ? UI.TopBarVisibility.Visible : UI.TopBarVisibility.AutoHide;
             ApplicationData.Current.LocalSettings.Values.Remove(topBarEnabled);
         }
     }
     catch { }
 }
Exemplo n.º 27
0
        public void Accept()
        {
            var locationCordinate = new NSDictionary
                                    (
                "latitude", currentLocation.Latitude.ToString(),
                "longitude", currentLocation.Longitude.ToString()
                                    );

            tripRef.GetChild("driver_location").SetValue <NSDictionary>(locationCordinate);
            tripRef.GetChild("driver_name").SetValue((NSString)AppDataHelper.GetFullName());
            tripRef.GetChild("driver_id").SetValue((NSString)AppDataHelper.GetDriverID());
            tripRef.GetChild("driver_phone").SetValue((NSString)AppDataHelper.GetPhone());
            tripRef.GetChild("status").SetValue((NSString)"accepted");
        }
Exemplo n.º 28
0
        protected override void OnResume()
        {
            base.OnResume();
            FirebaseUser currentUser = AppDataHelper.GetCurrentUser();

            if (currentUser == null)
            {
                StartActivity(typeof(LoginActivity));
            }
            else
            {
                StartActivity(typeof(LoginActivity));
            }
        }
Exemplo n.º 29
0
 private void storeData()
 {
     AppDataHelper.SetValue("uname", txt_UserName.Text);
     if (s_remember.IsChecked == true)
     {
         AppDataHelper.SetValue("upasswd", txt_Password.Password);
     }
     else
     {
         AppDataHelper.SetValue("upasswd", "");
     }
     AppDataHelper.SetValue("isrem", s_remember.IsChecked.ToString());
     AppDataHelper.SetValue("isauto", s_auto.IsChecked.ToString());
 }
Exemplo n.º 30
0
        private void TaskCompletionListener_Success(object sender, EventArgs e)
        {
            Snackbar.Make(rootView, "User Registration was Successful", Snackbar.LengthShort).Show();
            HashMap userMap = new HashMap();

            userMap.Put("email", email);
            userMap.Put("phone", phone);
            userMap.Put("fullname", fullname);


            DatabaseReference userReference = AppDataHelper.GetDatabase().GetReference("users/" + mAuth.CurrentUser.Uid);

            userReference.SetValue(userMap);
        }