Android
Once you've started receiving data from a device into your app, you can start sending this data to Terra's websocket server (the broker).
This will later allow you to receive it on your backend, and process it as per your requirements.
Prerequisite
Before following the steps below, make sure you've followed the guide to stream data from a wearable device to your app
Setting up a connection
You'll have previously set up a stream between a wearable device and your app using the startRealTime function. In order to to send this data back to the broker, you'll simply use a variant of the startRealTime function
Simply passing in a token from the following endpoint will allow you to stream the same data you were reading previously within your app, and have it sent to the broker
Make sure to pass in the correct user ID in the id
query paramter in the call below. You may retrieve that user the getUserId function in the SDK, when about to ask your backend to create the token
Last updated
Was this helpful?