Hi, I'm new to Xamarin and have been working on inserting records(documents) to Cloud Firestore. It one point about three days ago it was working without an issue. I was able to add. Now I'm getting error messages. It only happens in xamarin.android, xamarin.ios is still working. Any help would be greatly appreciated.
I get the error: CS1503: Argument 1: cannot convert from 'System.Collections.Generic.Dictionary<string, Java.Lang.Object>' to 'Java.Lang.Object'
See method below:
public bool InsertPost(Models.Post post)
{
try
{
var collection = Firebase.Firestore.FirebaseFirestore.Instance.Collection("Posts");
var postDoc = new Dictionary<string, Java.Lang.Object>
{
{ "UserId", Firebase.Auth.FirebaseAuth.Instance.CurrentUser.Uid },
{ "Title", post.Title },
{ "Detais", post.Details },
{ "PostDate", DateTimetoNativeDate(DateTime.Now) }
};
collection.Add(postDoc);
return true;
}
catch (Exception ex)
{
return false;
}
}