jawbone

Subscription API data for multiple days?


When a user does not sync with Jawbone App for a few days, and then finally syncs on next day, how is the Push data sent ? I tried this and it only sent me a single update in the pushed data.

[{"action":"creation","timestamp":1483892382,"user_xid":"RCLWx75WGKR_eIpHcR5gfA","type":"move","event_xid":"UDtVcjNFXvI7NpciWElZOTbfaRAF4oeQ"}]

Solution

  • When a user syncs multiple days worth of data at once, the data will appear in subsequent pubsub notifications. The data could arrive as:

    1. A single pubsub notification with multiple events
    2. Multiple pubsub notifications with a single event
    3. Some combination of 1 and 2.

    There's no way to determine ahead of time which of these scenarios you will get since it depends on numerous factors (e.g., how much data is synced, how it is processed out of Jawbone's queues, what data you've asked for notifications, etc.).

    There's also no guarantee that your notifications/events will arrive in chronological order, so your application should be ready to handle any of these scenarios.

    For more details, please refer to the pubsub documentation.