开发者

Basce64 encoding in android

开发者 https://www.devze.com 2023-02-12 09:35 出处:网络
I have to submit a base64 encoded string to my server. How to do this in android application. Pleas开发者_StackOverflowe help!!Android provides a util class for encoding and decoding Base64 strings,

I have to submit a base64 encoded string to my server. How to do this in android application.

Pleas开发者_StackOverflowe help!!


Android provides a util class for encoding and decoding Base64 strings, android.util.Base64


Base64 is included in Android.util only for API level 8 and greater. If you wish to use it in an earlier API, you'll have to write your own, or find the source via Google.


Android actually ships with support for this out of the box.

See the documentation


Android util package has Base64 class.


Presumably by implementing a string to base64 conversion function in Java? Android uses Java - you knew that, right? And Google has a great search tool - I think it's located at google.com. You could use it to search for base64 code in Java, and use that in your project.

0

精彩评论

暂无评论...
验证码 换一张
取 消