Package 

Class TimeZoneDataCallback

  • All Implemented Interfaces:
    android.os.Parcelable , no.nordicsemi.android.ble.callback.DataReceivedCallback , no.nordicsemi.android.ble.callback.profile.ProfileDataCallback , no.nordicsemi.android.ble.common.profile.TimeZoneCallback

    
    public abstract class TimeZoneDataCallback
    extends ProfileReadResponse implements TimeZoneCallback
                        

    Data callback that parses 1-byte value into a Time Zone offset. If the value received is shorter than 1 byte the onInvalidDataReceived callback will be called.

    • Method Summary

      Modifier and Type Method Description
      void onDataReceived(@NonNull() BluetoothDevice device, @NonNull() Data data)
      static Integer readTimeZone(@NonNull() Data data, int offset) Offset from UTC in number of 15 minutes increments.
      • Methods inherited from class no.nordicsemi.android.ble.callback.profile.ProfileReadResponse

        isValid, onInvalidDataReceived, writeToParcel
      • Methods inherited from class no.nordicsemi.android.ble.response.ReadResponse

        describeContents, getBluetoothDevice, getRawData, onDataReceived
      • Methods inherited from class no.nordicsemi.android.ble.common.profile.TimeZoneCallback

        onTimeZoneReceived, onUnknownTimeZoneReceived
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TimeZoneDataCallback

        TimeZoneDataCallback()
    • Method Detail

      • readTimeZone

        @Nullable() static Integer readTimeZone(@NonNull() Data data, int offset)

        Offset from UTC in number of 15 minutes increments. A value of -128 means that the time zoneoffset is not known. The offset defined in this characteristic is constant, regardlesswhether daylight savings is in effect.

        Parameters:
        data - data received.
        offset - offset from which the time zone is to be read.