HealthData
overviewpackageclasstreedeprecatedindex com samsung android sdk healthdata class healthdata java lang object com samsung android sdk healthdata healthdata all implemented interfaces parcelable public final class healthdata extends object implements parcelable this class presents a health data object for a specified health data type, e g the blood pressure or weight handling health data quantitative and qualitative values of health data can be specified through this class set each property value of health data based on its data type definition and manage it with healthdataresolver the data type definitions are described in samsung health's data types example see inserting health data since 1 0 0 constructor summary constructors constructor and description healthdata creates a health data instance method summary all methods instance methods concrete methods modifier and type method and description void clear clears values of all properties in the health data object byte[] getblob string key gets a blob value associated with a given property double getdouble string key gets a double value associated with a given property float getfloat string key gets a float value associated with a given property inputstream getinputstream string key gets an inputstream associated with a given property int getint string key gets an integer value associated with a given property long getlong string key gets a long value associated with a given property string getsourcedevice gets the source device which provides health data string getstring string key gets a text value associated with a given property string getuuid gets the unique id of the object void putblob string key, byte[] value inserts a blob value into a given property of the health data object void putdouble string key, double value puts a double value into the given property of the health data object void putfloat string key, float value puts a float value into a given property of the health data object void putinputstream string key, inputstream value inserts an inputstream into a given property of the health data object void putint string key, int value puts an integer value into a given property of the health data object void putlong string key, long value puts a long value into a given property of the health data object void putnull string key inserts a null value into a given property of the health data object void putstring string key, string value puts a text value into a given property of the health data object void setsourcedevice string deviceuuid sets the source device which provides health data constructor detail healthdata public healthdata creates a health data instance since 1 0 0 method detail getuuid public string getuuid gets the unique id of the object use getstring to get the data's uuid from a result in healthdataresolver aggregateresult healthdataresolver readresult returns the unique id contained in the object throws unsupportedoperationexception - if the health data is in healthdataresolver aggregateresult or healthdataresolver readresult since 1 0 0 getsourcedevice public string getsourcedevice gets the source device which provides health data returns the id of the source device which provides health data since 1 0 0 setsourcedevice public void setsourcedevice string deviceuuid sets the source device which provides health data it's mandatory to set the source device for created health data parameters deviceuuid - the source device id which provides health data since 1 0 0 getstring public string getstring string key gets a text value associated with a given property parameters key - the specific property name of health data that its value type is text e g healthconstants exercise comment returns the text value, or null if the health data object does not have the given property since 1 0 0 getfloat public float getfloat string key gets a float value associated with a given property parameters key - the specific property name of health data that its value type is float e g healthconstants exercise distance returns the float value, or 0 0f if the health data object does not have the given property since 1 0 0 getdouble public double getdouble string key gets a double value associated with a given property parameters key - the specific property name of health data that its value type is double returns the double value, or 0 0d if the desired type does not exist for the given property since 1 0 0 getlong public long getlong string key gets a long value associated with a given property parameters key - the specific property name of health data that its value type is long e g healthconstants exercise duration returns the long value, or 0l if the desired type does not exist for the given property since 1 0 0 getint public int getint string key gets an integer value associated with a given property parameters key - the specific property name of health data that its value type is integer e g healthconstants bloodglucose measurement_type returns the integer value, or 0 if the desired type does not exist for the given property since 1 0 0 getblob public byte[] getblob string key gets a blob value associated with a given property parameters key - the specific property name of health data that its value type is blob e g healthconstants exercise live_data returns the blob value, or null if the desired type does not exist for the given property since 1 0 0 getinputstream public inputstream getinputstream string key gets an inputstream associated with a given property parameters key - the specific property name of health data that its value type is file e g healthconstants healthdocument document returns the inputstream object, or null if the desired type does not exist for the given property since 1 3 0 putint public void putint string key, int value puts an integer value into a given property of the health data object the existing value for the property is replaced parameters key - the health data's specific property name that its value type is integer e g healthconstants bloodglucose measurement_type value - the integer value for the given property since 1 0 0 putlong public void putlong string key, long value puts a long value into a given property of the health data object the existing value for the property is replaced parameters key - the health data's specific property name that its value type is long e g healthconstants exercise duration value - the long value for the given property since 1 0 0 putfloat public void putfloat string key, float value puts a float value into a given property of the health data object the existing value for the property is replaced parameters key - the health data's specific property name that its value type is float e g healthconstants exercise distance value - the float value for the given property since 1 0 0 putdouble public void putdouble string key, double value puts a double value into the given property of the health data object the existing value for the property is replaced parameters key - the health data's specific property name that its value type is double value - the double value for the given property since 1 0 0 putstring public void putstring string key, string value puts a text value into a given property of the health data object the existing value for the property is replaced parameters key - the health data's specific property name that its value type is text e g healthconstants exercise comment value - the text value for the given property since 1 0 0 putblob public void putblob string key, byte[] value inserts a blob value into a given property of the health data object the existing value for the property is replaced parameters key - the health data's specific property name that its value type is blob e g healthconstants exercise live_data value - the blob value for the given property since 1 0 0 putinputstream public void putinputstream string key, inputstream value inserts an inputstream into a given property of the health data object the existing value for the property is replaced parameters key - the health data's specific property name that its value type is file e g healthconstants healthdocument document value - the inputstream object for the given property since 1 3 0 putnull public void putnull string key inserts a null value into a given property of the health data object the existing value for the property is replaced parameters key - the health data's specific property name since 1 1 0 clear public void clear clears values of all properties in the health data object since 1 0 0