pusher/pusher-http-java

Library isn't compatible with android

ruXlab opened this issue · 3 comments

Apache HTTP client is shipped with android SDK and it doesn't have full implementation of Hex class, hence android users get NoSuchMethodException

  java.lang.NoSuchMethodError: No static method encodeHexString([B)Ljava/lang/String; in class Lorg/apache/commons/codec/binary/Hex; or its super classes (declaration of 'org.apache.commons.codec.binary.Hex' appears in /system/framework/org.apache.http.legacy.boot.jar)
at com.pusher.rest.SignatureUtil.bodyMd5(SignatureUtil.java:68)
at com.pusher.rest.SignatureUtil.uri(SignatureUtil.java:41)
at com.pusher.rest.Pusher.post(Pusher.java:431)
at com.pusher.rest.Pusher.trigger(Pusher.java:347)
at com.pusher.rest.Pusher.trigger(Pusher.java:324)

The solution would be another implementation of those methods

Here you can find similar problem and ways people resolve it

kn100 commented

We don't really intend this library for use on Android Clients - What's the use case?

Well, it's been a year and I have chosen another implementation

kn100 commented

Alright, thanks for the reply and sorry for the extremely delayed response!