Fix IoT3Mobility SDK incompatibility with Android 31, specifically in the message parsing and generation classes.
Request received from a SDK user:
DENM/CAM/CPM… publishing string method “private String writeToString” breaks inside depending on the Android SDK API level and or java version:
In line 151 of the DenmHelper.java file, the code uses: return out.toString(StandardCharsets.UTF_8);
The problem is that the toString(Charset) method of ByteArrayOutputStream does not exist in Android API 31 (our minSdk is 31).
This method was introduced in Java 11, but Android does not always incorporate all methods from newer Java versions.
Fix IoT3Mobility SDK incompatibility with Android 31, specifically in the message parsing and generation classes.
Request received from a SDK user: