Ad

Friday, September 27, 2013

Android code to check internet availability

ConnectivityManager cm = 
(ConnectivityManager) getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);

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

Monday, September 23, 2013

Hide Keyboard in Android

Method 1:

getWindow().setSoftInputMode
(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);


Method 2:


InputMethodManager imm = (InputMethodManager)getSystemService( Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);

Monday, July 29, 2013

How to install an Android Driver in the Window PC?

Step 1:
   Download the drivers from the website..
   For example: You can get asus drivers from here.

Step 2:
  Connect the device to the system.

Step 3:
   Open the device Manager.
      Win7:help
      WinXP:help

Step 4:
  Select the device(in the Other device).

Step 5:
   Select the button "Reinstall Driver".

   Then choose the driver file.  And install..