com.samsung.android.sdk.healthdata

Interface HealthConstants.SessionMeasurement

    • Field Detail

      • START_TIME

        static final String START_TIME
        UTC milliseconds when the measurement is started.
        TIME_OFFSET needs to set for showing the data's measured time properly.

        • Mandatory
        • Type: long
        • Value range: 0 and above

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • END_TIME

        static final String END_TIME
        UTC milliseconds after the measurement has ended.
        TIME_OFFSET needs to set for showing the data's measured time properly.

        • Mandatory
        • Type: long
        • Value range: equal or bigger than START_TIME

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • TIME_OFFSET

        static final String TIME_OFFSET
        Time offset which considers the time zone and daylight saving time. E.g. Tehran (UTC+3:30) is presented as 12600000 (3.5 * 60 * 60 * 1000). It affects to START_TIME and END_TIME to show measured time properly to the user.

        • Mandatory
        • Type: long
        • Value range: -43200000 (-12 * 60 * 60 * 1000) ~ 50400000 (14 * 60 * 60 * 1000)

        Refer to the following example for getting the time offset value as the current device's preferred time zone, which daylight is not used.

           public class HeathDataExample {
          
               long getTimeOffset(long currentTime) {
                   return TimeZone.getDefault().getOffset(currentTime);
               }
           }

        Since:
        1.0.0
        See Also:
        Constant Field Values