Thursday 24 January 2013

How To publish android application in market.

Process of publish an application in the android market (Google-Play).

Android Market:
Android Market now called Google Play is a digital-distribution multimedia-content service from Google which includes an online store for music, movies, books, and Android applications and games, as well as a cloud media player.
For publishing the application in the market we need to check the following points:
·         Getting application ready
a.       Request necessary android permission
b.      Specify a name and icon
c.       Configure  version manifest data
d.      Set compatibility option
e.       Cleanup file and removing logging
f.       Sign in and zip align the application
·         Becoming a market publisher
a.       Register as a publisher and setup your profile
b.      Read and agree to the Android Market Developer Distribution Agreement.
c.       Pay a registration fee of $25 USD via Google Checkout.
To publish applications on the Android Market, you must be a registered developer. Head over to and sign in with your Google account. Next, fill out all the required information along with your real phone number, which Google will use to contact you in the event of an emergency or a problem with any of your Android applications. If you can’t decide on a developer name, don’t worry. Just use your real name for now – you can always change that later via your profile page.
You should read the Android Market Developer Distribution Agreement carefully, as you are required to accept the terms and you will be legally bound to them upon paying the registration fee.
Click the Google Checkout button and pay the one-time registration fee and you’re done!

·         Uploading an application
Login to your publisher account and click “Upload an Application”. Fill in all of the form data and include screenshots if you can and provide a precise, short and well-formatted description. You can also choose whether or not you want to release it as a free or paid app – though you need to be a registered Google Checkout Merchant to do the latter and it’s currently only available in a handful of countries. Lastly, click “Publish.” 
Our new android application for EGreeting.Have a look to it.
 The Greetings Android Application 



NovaRadix Android Application Development Team
NovaRadix Technology


Check Internet Connection in Android

       public boolean isOnline() {
              ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
              NetworkInfo netInfo = cm.getActiveNetworkInfo();

              if (netInfo != null && netInfo.isConnectedOrConnecting()
                           && cm.getActiveNetworkInfo().isAvailable()
                           && cm.getActiveNetworkInfo().isConnected()) {
                     return true;
              return false;

there another method you want to use 

       public static boolean haveNetworkConnection(final Context context) {
              boolean haveConnectedWifi = false;
              boolean haveConnectedMobile = false;

              final ConnectivityManager cm = (ConnectivityManager) context
              if (cm != null) {
                     final NetworkInfo[] netInfo = cm.getAllNetworkInfo();
                     for (final NetworkInfo netInfoCheck : netInfo) {
                           if (netInfoCheck.getTypeName().equalsIgnoreCase("WIFI")) {
                                  if (netInfoCheck.isConnected()) {
                                         haveConnectedWifi = true;
                           if (netInfoCheck.getTypeName().equalsIgnoreCase("MOBILE")) {
                                  if (netInfoCheck.isConnected()) {
                                         haveConnectedMobile = true;

              return haveConnectedWifi || haveConnectedMobile;


         if (haveNetworkConnection(Activity.this))
                //No Connected

Note:- you also give User Permission
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

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) {



Base 64 of "xyzstring" is “eHl6c3RyaW5n”

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

NovaRadix Android Application Development Team
NovaRadix Technology

Tuesday 22 January 2013

SharedPreference example in Android

 SharedPreference example in Android

Application shared preferences allows you to save and retrieve data in key, value pair.
Initialization of SharedPreference in Android:.

Application shared preferences can be fetched using getSharedPreferences() method.The following code can be used to get application shared preferences.

       SharedPreferences pref = getApplicationContext().getSharedPreferences(
                           "any_prefname", MODE_PRIVATE);

Available mode for shared preference:

To edit sharedpreference value, we need editor to edit and save the changes in shared preferences.

Editor editor = pref.edit();
and to save data commit() is used.

You can save data into shared preferences using editor. All the primitive data types like booleans, floats, ints, longs, and strings are supported. Call editor.commit() in order to save changes to shared preferences.

              editor.putBoolean("key_name", true); // Storing boolean - true/false
              editor.putString("key_name", "string value"); // Storing string
              editor.putInt("key_name", "int value"); // Storing integer
              editor.putFloat("key_name", "float value"); // Storing float
              editor.putLong("key_name", "long value"); // Storing long
         editor.commit(); // commit changes

Get data from Shared Preference:

Data can be retrived from saved preferences by calling getString() (For string) method.for boolean getBoolean() Remember this method should be called on Shared Preferences not on Editor.

// returns stored preference value
// If value is not present return second param value - In this case null

              pref.getString("key_name", null); // getting String
              pref.getInt("key_name", null); // getting Integer
              pref.getFloat("key_name", null); // getting Float
              pref.getLong("key_name", null); // getting Long
              pref.getBoolean("key_name", null); // getting boolean

Delete data from shared preference and delete sharedpreference:

To delete data from shared preferences we can use remove(“key_name”).If we want to delete all the data, call clear()

editor.remove("student_name");//will delete student_name

Following will clear all the data from shared preferences

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

NovaRadix Android Application Development Team
NovaRadix Technology

Call web services easily

get source code from here, Download