Saturday, 30 March 2013

How to check SD card availability in android devices.



The following method returns true if your device is mounted with the SD card else returns false:


      public static boolean isSdCardPresent() {
return android.os.Environment.getExternalStorageState().equals(
android.os.Environment.MEDIA_MOUNTED);
}


How to check internet connection in android

The below method helps you to find out whether your device is connected with any kind of network :

public boolean isOnline(Context context) {

ConnectivityManager cm = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo netInfo = cm.getActiveNetworkInfo();
if (netInfo != null && netInfo.isConnectedOrConnecting()) {
return true;
}
return false;
}

  The above function returns true if the device has been connected with the internet else return false.

Wednesday, 23 January 2013

Onsite in kuwait

These pics are taken in kuwait when i was there for onsite project at Dana Real Estate ltd.

Kuwait view from my flat. 

My office Entrance Dana Real Estate.



It is kuwait National tower behind me.


Taken in the harvest festival on a breezy day.


Punitha's marriage : with Mani and Akilan.


This is my favorite spot at kuwait.