Skip to content

Java/IoT3Mobility: make JSON ETSI messages implementation compatible with Android 31 #564

Description

@mathieu1fb

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.

Metadata

Metadata

Assignees

Labels

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions