JSON is the easiest and more versatile approach, particularly using the Json.NET component in the Xamarin Component Store (or NuGet). This allows objects such as object of type ObjectClass to be serialized into JSON with the SerializeObject method. See Listing 6-50.

And the objects can be deserialized with DeserializeObject in the activity called PassToActivity:

    String json = Intent.GetStringExtra("MyData") ?? "No Data";    DataModel data =        Newtonsoft.Json.JsonConvert.DeserializeObject<DataModel>(json); ...

Get Xamarin Mobile Application Development: Cross-Platform C# and Xamarin.Forms Fundamentals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.