Skip to content

Instantly share code, notes, and snippets.

@smuldr
Last active December 21, 2015 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smuldr/6221823 to your computer and use it in GitHub Desktop.
Save smuldr/6221823 to your computer and use it in GitHub Desktop.
How to make sure the SenseApi returns a sensor ID for your own device.
try {
String deviceUuid = SenseApi.getDefaultDeviceUuid(this);
SenseApi.getSensorId(this, "name", null, null, deviceUuid);
} catch (IOException e) {
// TODO: Handle exception when connection failed
} catch (JSONException e) {
// TODO: Handle exception when response was unparsable
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment