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.PebbleDataReceiver

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


    public abstract static class PebbleKit.PebbleDataReceiver
    extends android.content.BroadcastReceiver
    A special-purpose BroadcastReceiver that makes it easy to handle 'RECEIVE' 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 PebbleDataReceiver(java.util.UUID subscribedUuid)
      Instantiates a new pebble data receiver.
    • Method Summary

      Modifier and Type Method and Description
      void onReceive(android.content.Context context, android.content.Intent intent)
      abstract void receiveData(android.content.Context context, int transactionId, PebbleDictionary data)
      Perform some work on the data received from the connected watch.
      • 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

      • PebbleDataReceiver

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

      • receiveData

        public abstract void receiveData(android.content.Context context,
                                         int transactionId,
                                         PebbleDictionary data)
        Perform some work on the data received from the connected watch.
        Parameters:
        context - The BroadcastReceiver's context.
        transactionId - The transaction ID of the message in which the data was received. This is required when ACK/NACKing the received message.
        data - A dictionary of one-or-more key-value pairs received from the connected watch.
      • onReceive

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