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