Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

How to sync Firebase chat to local sqlite in Xamarin.forms

$
0
0

Unable to sync firebase chat to local database.
I am using _lstChat.ItemsSource = db.subChat(data.Key); for direct bind firebase chat to list.
But When I want to save locally
var dd = db.subChat(data.Key);
App.Database.SaveItemAsync2(dd); I am getting 0 in dd. Actually its take 3-4 second to bind. So want to maintain all chat locally and background sync through sqlite to Firebase.

public ObservableCollection<Chat> subChat(string _roomKEY)
    {

        return fbClient.Child("ChatApp/"+_roomKEY+"/Message")
                       .AsObservable<Chat>()
                       .AsObservableCollection<Chat>();
    }

Viewing all articles
Browse latest Browse all 77050

Trending Articles



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