locked
Retrieving Single Data in Firebase Xamarin RRS feed

  • Question

  • User342721 posted

    Hey Buddies, Does anyone here using Firebase on their xamarin android or xamarin forms project? I managed to retrieve list of data from firebase. But im having trouble how to retrieve single data only using their key. Here is the code for retrieving list from the firebase. Thanks you very much.

    private async Task LoadData() {

            var firebase = new FirebaseClient(Database.FirebaseURL);
    
            var items = await firebase
                .Child("users")
                .OnceAsync<Account>();
    
            list_users.Clear();
            adapter = null;
            foreach (var item in items)
            {
                Account acc = new Account();
                acc.uId = item.Key;
                acc.Name = item.Object.Name;
                acc.Email = item.Object.Email;
                list_users.Add(acc);
            }
    
    Thursday, October 19, 2017 2:52 PM

All replies

  • User365920 posted

    hi jimbei, did you find solution for this?

    Thursday, March 1, 2018 9:25 AM
  • User236903 posted

    Do you mean that you want to create a where condition for retreiving data?

    Thursday, March 1, 2018 7:54 PM