pebble
  • Tutorials
  • Get the SDK
  • Guides
  • Documentation
  • Examples
  • Community
  • Blog
  • More
Privacy
Cookies
Publish

PebbleKit Android

  • Pebble C API
  • Pebble JavaScript API
  • PebbleKit JS
  • PebbleKit iOS
  • PebbleKit Android
  • com.getpebble.android.kit
    • Constants
    • PebbleKit
    • PebbleKit.FirmwareVersionInfo
    • PebbleKit.PebbleAckReceiver
    • PebbleKit.PebbleDataLogReceiver
    • PebbleKit.PebbleDataReceiver
    • PebbleKit.PebbleNackReceiver
    • Constants.PebbleAppType
    • Constants.PebbleDataType
  • com.getpebble.android.kit.util
    • PebbleDictionary
    • PebbleTuple
    • SportsState
    • PebbleDictionary.PebbleDictTypeException
    • PebbleDictionary.TupleOverflowException
    • PebbleTuple.ValueOverflowException

PebbleKit.PebbleDataLogReceiver

  • java.lang.Object
    • android.content.BroadcastReceiver
      • com.getpebble.android.kit.PebbleKit.PebbleDataLogReceiver
  • Enclosing class:
    PebbleKit


    public abstract static class PebbleKit.PebbleDataLogReceiver
    extends android.content.BroadcastReceiver
    A special-purpose BroadcastReceiver that makes it easy to handle 'DATA_AVAILABLE' data logging intents broadcast from pebble.apk.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class android.content.BroadcastReceiver

        android.content.BroadcastReceiver.PendingResult
    • Constructor Summary

      Modifier Constructor and Description
      protected PebbleDataLogReceiver(java.util.UUID subscribedUuid)
      Instantiates a new pebble nack receiver.
    • Method Summary

      Modifier and Type Method and Description
      void onFinishSession(android.content.Context context, java.util.UUID logUuid, java.lang.Long timestamp, java.lang.Long tag)
      Called when a session has been finished on the watch and all data has been transmitted by pebble.apk
      void onReceive(android.content.Context context, android.content.Intent intent)
      void receiveData(android.content.Context context, java.util.UUID logUuid, java.lang.Long timestamp, java.lang.Long tag, byte[] data)
      Handle a byte array data unit that was logged the watch and broadcast by pebble.apk.
      void receiveData(android.content.Context context, java.util.UUID logUuid, java.lang.Long timestamp, java.lang.Long tag, int data)
      Handle an int data unit that was logged the watch and broadcast by pebble.apk.
      void receiveData(android.content.Context context, java.util.UUID logUuid, java.lang.Long timestamp, java.lang.Long tag, java.lang.Long data)
      Handle an UnsignedInteger data unit that was logged the watch and broadcast by pebble.apk.
      • Methods inherited from class android.content.BroadcastReceiver

        abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
      • Methods inherited from class java.lang.Object

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

      • PebbleDataLogReceiver

        protected PebbleDataLogReceiver(java.util.UUID subscribedUuid)
        Instantiates a new pebble nack receiver.
        Parameters:
        subscribedUuid - the subscribed uuid
    • Method Detail

      • receiveData

        public void receiveData(android.content.Context context,
                                java.util.UUID logUuid,
                                java.lang.Long timestamp,
                                java.lang.Long tag,
                                java.lang.Long data)
        Handle an UnsignedInteger data unit that was logged the watch and broadcast by pebble.apk.
        Parameters:
        context - The BroadcastReceiver's context.
        logUuid - The UUID that uniquely identifies a data log.
        timestamp - The timestamp when a data log was first created.
        tag - The user-defined tag for the corresponding data log.
        data - The unit of data that was logged on the watch.
        Throws:
        java.lang.UnsupportedOperationException - Thrown if data is received and this handler is not implemented.
      • receiveData

        public void receiveData(android.content.Context context,
                                java.util.UUID logUuid,
                                java.lang.Long timestamp,
                                java.lang.Long tag,
                                byte[] data)
        Handle a byte array data unit that was logged the watch and broadcast by pebble.apk.
        Parameters:
        context - The BroadcastReceiver's context.
        logUuid - The UUID that uniquely identifies a data log.
        timestamp - The timestamp when a data log was first created.
        tag - The user-defined tag for the corresponding data log.
        data - The unit of data that was logged on the watch.
        Throws:
        java.lang.UnsupportedOperationException - Thrown if data is received and this handler is not implemented.
      • receiveData

        public void receiveData(android.content.Context context,
                                java.util.UUID logUuid,
                                java.lang.Long timestamp,
                                java.lang.Long tag,
                                int data)
        Handle an int data unit that was logged the watch and broadcast by pebble.apk.
        Parameters:
        context - The BroadcastReceiver's context.
        logUuid - The UUID that uniquely identifies a data log.
        timestamp - The timestamp when a data log was first created.
        tag - The user-defined tag for the corresponding data log.
        data - The unit of data that was logged on the watch.
        Throws:
        java.lang.UnsupportedOperationException - Thrown if data is received and this handler is not implemented.
      • onFinishSession

        public void onFinishSession(android.content.Context context,
                                    java.util.UUID logUuid,
                                    java.lang.Long timestamp,
                                    java.lang.Long tag)
        Called when a session has been finished on the watch and all data has been transmitted by pebble.apk
        Parameters:
        context - The BroadcastReceiver's context.
        logUuid - The UUID that uniquely identifies a data log.
        timestamp - The timestamp when a data log was first created.
        tag - The user-defined tag for the corresponding data log.
      • onReceive

        public void onReceive(android.content.Context context,
                              android.content.Intent intent)
        Specified by:
        onReceive in class android.content.BroadcastReceiver