There is no DataTypeConverter method option in android

I want to use DataTypeConverter.printBase64Binary (.........) in my project. But there is no way to go through intellisense. Am I missing some jars?

+8
java android
source share
2 answers

The Android API provides Base64 for the conversion you are looking for. However, I used Apache Codec as a cross-platform compatibility library for the client library to work around this problem.

+2
source share

You can use these methods. compile 'commons-codec: commons-codec: 1.3'

and I use android.util.Base64 for Android

incompatible / replacement

DatatypeConverter.parseHexBinary org.apache.commons.codec.binary.Hex.decodeHex(key.toCharArray()); DatatypeConverter.printBase64Binary(finalData); android.util.Base64.encodeToString(finalData, 16) DatatypeConverter.parseBase64Binary(encodedInitialData); org.apache.commons.codec.binary.Hex.decodeHex(key.toCharArray()); 

Question

+2
source share

All Articles