I am new to android and wants to encode and decode html page using base64 and save html page in memory card.If any one can help me its great support for me
Asked
Active
Viewed 1,236 times
1 Answers
0
Have a look at Android's Base64
class. The documentation is here:
It has obviously named methods that you can use very easily:
For more information, there is no way I can improve on the excellent Jon Skeet in this link.
Here is his example code:
// Sending side
byte[] data = text.getBytes("UTF-8");
String base64 = Base64.encodeToString(data, Base64.DEFAULT);
// Receiving side
byte[] data = Base64.decode(base64, Base64.DEFAULT);
String text = new String(data, "UTF-8");

Community
- 1
- 1

Richard Le Mesurier
- 29,432
- 22
- 140
- 255