Open Mechameesh opened 4 years ago
It seems that creating the builder has to be done through the InvokeBuilder()
method on the FitnessOptions
class.
Changed the code to
var fitnessApiOptions = FitnessOptions.InvokeBuilder()
.AddDataType(Android.Gms.Fitness.Data.DataType.AggregateActivitySummary, FitnessOptions.AccessWrite)
.AddDataType(Android.Gms.Fitness.Data.DataType.AggregateSpeedSummary, FitnessOptions.AccessWrite)
.Build();
and the FitnessOptions are created.
I'll keep the issue open because documentation is poor, and I would expect the mapped classes to behave like their java counterparts.
Using the following nuget packages
Xamarin.Forms Version 4.3.0.947036 Xamarin.GooglePlayServices.Auth 71.1600.0 Xamarin.GooglePlayServices.Fitness 71.1601.0
OS
Windows 10 Version 1903
Description
Cannot create a Android.Gms.Fitness.FitnessOptions.Builder instance because
FitnessOptions.Builder' does not contain a constructor that takes 0 arguments
Steps to Reproduce