Closed liuzhen2008 closed 7 years ago
@liuzhen2008 thanks for reporting this and sorry for the inconvenience.
Fortunately this looks like the issue can be fixed quite trivially by replacing:
Serialisation.gson.toJson(message).getBytes(StandardCharsets.UTF_8);
with:
Serialisation.gson.toJson(message).getBytes(Charset.forName("UTF-8"));
Reference https://stackoverflow.com/questions/32102166/standardcharsets-utf-8-on-lower-api-lower-than-19
We'll see if we can get a fix out for it ASAP, unless you want to do a PR perhaps to fix it before one of our engineers gets the time to do a fix? Looks like only 4 lines need changing
@mattheworiordan Do you know what I can do so that I can include my own fork in my current project?
I tried to simply include this line
compile 'com.github.liuzhen2008:ably-android:v1.0.1'
into my dependencies, but it looks like it is not as simple as that.
(I got this error instead)
Error:Could not GET 'https://jitpack.io/com/github/liuzhen2008/ably-android/v1.0.1/ably-android-v1.0.1.pom'. Received status code 401 from server: Unauthorized
Enable Gradle 'offline mode' and sync project
Do you have any idea how I can include the fix quickly?
@mattheworiordan I see the PR has been merged. How do I include the latest master build?
I see the PR has been merged. How do I include the latest master build?
I'll be doing a release shortly. Unfortunately for Android we don't have a build option to build a full jar from source so it's not easy for you to run the latest version until we make a release.
This is now released as https://bintray.com/ably-io/ably/ably-android/1.0.1
Hi, I have the same issue with the lastest version 1.2.1 on android.
My app installed on a android jelly bean phone would crash immediately on launch.
It looks like the ably SDK is using "StandardCharset" And it is only introduced in API level 19. https://developer.android.com/reference/java/nio/charset/StandardCharsets.html
This is different from the doc saying it supports API 14.