Showing posts with label Greeting. Show all posts
Showing posts with label Greeting. Show all posts

Thursday, 24 January 2013

Convert String in to base64 in Android



Convert String in to base64 in Android



byte[] data;

              String str = "xyzstring";

              try {

                     data = str.getBytes("UTF-8");

                     String base64 = Base64.encodeToString(data, Base64.DEFAULT);

                     Log.i("Base 64 ", base64);

              } catch (UnsupportedEncodingException e) {

                     e.printStackTrace();

              }



Base 64 of "xyzstring" is “eHl6c3RyaW5n”

--------------------------------------------------------------------------------
Our new android application for EGreeting.Have a look to it.
The Greetings Android Application 
QRCode

NovaRadix Android Application Development Team
NovaRadix Technology
WWW.NOVARADIX.COM

Call web services easily

get source code from here, Download