I want to use DataTypeConverter.printBase64Binary(.........) in my project. But there is no option coming through intellisense. Am i missing some jar ?
Asked
Active
Viewed 7,941 times
2 Answers
4
you can use this 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());

Community
- 1
- 1

David Hackro
- 3,652
- 6
- 41
- 61
-
it works for me for scribd java support for convert data type in android Pie API 28 – Faisal Jan 02 '19 at 12:52
2
Android API provides Base64 to do the conversions you are looking for. However, I used Apache Codec as a compatibility library between different platforms for the client library to get around this issue.

Archimedes Trajano
- 35,625
- 19
- 175
- 265
[2012-10-16 15:48:07 - DistimoApp] Dx trouble processing "javax/xml/bind/Binder.class": Ill-advised or mistaken usage of a core class (java.* or javax.*) when not building a core library. This is often due to inadvertently including a core library file in your application's project, when using an IDE (such as Eclipse). If you are sure you're not intentionally defining a core class, then this is the most likely explanation of what's going on. – Mufrah Oct 16 '12 at 10:49