Last active
December 21, 2015 00:39
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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