Android-SDK ParticleCloudException on getDevices()

Hi all,

I keep on getting a ParticleCloudException with very little information in the stack trace on a call to getDevices();

My code is pretty simple:

List devices = ParticleCloudSDK.getCloud().getDevices();
for (ParticleDevice device : devices) {
// Log.d(TAG, device.getName());
}

after I have done a ParticleCloudSDK.init(this); of course…

Is there any way that I can better debug this? The login function works just fine, but listing devices gives an error every time!

Did you ever figure this out? I’m having this problem and am at the end of my rope

@MysteryPoo it’s probably related to this: https://github.com/spark/spark-sdk-android/issues/12

The solution is that there’s probably some invalid data somewhere in the JSON blob. I was trying to enforce a stronger contract with the Android SDK, so that errors were loud and obvious. However, this has come up enough times that I’m going to acquiesce and just fail silently and move on when encountering bad data (with some logging, if desired by the app dev). The fix will be in the next SDK release.