android - Setting DataPoint for for Custom DataType in Google Fit -
i'm getting following error when trying set datapoint custom datatype app use google fit.
error: getvalue (com.google.android.gms.fitness.data.field) in datapoint cannot applied (int)
datapoint datapoint = datapoint.create(mydatasource); datapoint.getvalue(0).setint(totalcount); dataset.add(datapoint);
i know missing i'm not sure what.
i had create own field, not sure .zzn after exploring field datatype saw method , seems working far
myfield = field.zzn("custom",field.format_int32); datatypecreaterequest request = new datatypecreaterequest.builder() .setname("net.riversidestudios.pushupchallenge.pushup") .addfield(myfield) .build();
Comments
Post a Comment