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
ConstructorsModifierConstructorDescriptionprotected
PebbleDataLogReceiver
(UUID subscribedUuid) Instantiates a new pebble nack receiver. -
Method Summary
Modifier and TypeMethodDescriptionvoid
onFinishSession
(android.content.Context context, UUID logUuid, Long timestamp, Long tag) Called when a session has been finished on the watch and all data has been transmitted by pebble.apkvoid
onReceive
(android.content.Context context, android.content.Intent intent) void
receiveData
(android.content.Context context, UUID logUuid, Long timestamp, 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, UUID logUuid, Long timestamp, 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, UUID logUuid, Long timestamp, Long tag, 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, getSentFromPackage, getSentFromUid, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
-
Constructor Details
-
PebbleDataLogReceiver
Instantiates a new pebble nack receiver.- Parameters:
-
subscribedUuid
- the subscribed uuid
-
-
Method Details
-
receiveData
public void receiveData(android.content.Context context, UUID logUuid, Long timestamp, Long tag, 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:
-
UnsupportedOperationException
- Thrown if data is received and this handler is not implemented.
-
receiveData
public void receiveData(android.content.Context context, UUID logUuid, Long timestamp, 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:
-
UnsupportedOperationException
- Thrown if data is received and this handler is not implemented.
-
receiveData
public void receiveData(android.content.Context context, UUID logUuid, Long timestamp, 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:
-
UnsupportedOperationException
- Thrown if data is received and this handler is not implemented.
-
onFinishSession
public void onFinishSession(android.content.Context context, UUID logUuid, Long timestamp, 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 classandroid.content.BroadcastReceiver
-