Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Retrieving Single Data in Firebase Xamarin

$
0
0

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);
        }

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>