if (mgr!= null) mgr.setLogMessageHandler("switch_log", new WHMessageHandler("Switch"));
The serialisation works because I retrieve all Ids (switch, orientation, ...) but mgr is null. I serialize with Base64 encoder ? I'm missing something ?
And so when I download logs I have unknow logs with id corresponding to stored Id
Okkayyyy on method description of serializeState() you should explain the byte[] is a JSON and it's legal to do new String(serial). I understand that watching the exemple code.
In you exemple you do it onComplete() but if we have multiple sensor I assume it could be done for each onComplete().
The point of returning a byte array is so the user doesn't know anything about the internal formatting. If someday, a more compact serialization format is needed, it does not affect the user as all they see is a byte array rather than expecting a formatted string (JSON, XML, English characters, etc.). Creating a string from the byte array simply gives you a "nice" way to look at the bytes rather than look at hex values.
It is possible you are starting the accelerometer before the other components are enabled. Once the accelerometer is in active mode, all configurations are ignored. Routes are added in order they are committed so you can have the last async operation start the accelerometer.
You can combine the log and stream calls in one route.
Comments