It’s Marshmallow! Official name of Android M

It’s Marshmallow! Official name of Android M

What were the name guesses of 'Android M' that occupied most of us when Google created a suspense three months ago at the launch of the Android M Developer Preview at Google I/O in May. Muffin?, or Mango shake?, Milkshake?, Malt ball?, Moon Pie?, Macaroon?, or is it Mars?, Marshmallow?" Yes…continue reading →

How to manually dismiss the keypad in Android

If you want to dismiss the keypad manually through code, you can do that with the following methods Method 1: @Override public boolean dispatchTouchEvent(MotionEvent event) { View view = getCurrentFocus(); boolean ret = super.dispatchTouchEvent(event); if (view instanceof EditText) { View w = getCurrentFocus(); int scrcoords[] = new int[2]; w.getLocationOnScreen(scrcoords); float…continue reading →
How to open only default camera without showing chooser in Android

How to open only default camera without showing chooser in Android

In some cases you might want to open only default camera of the device without showing chooser of 3rd party camera applications. You can try following code, its working perfectly fine in my case. PackageManager packageManager = context.getPackageManager(); List<ApplicationInfo> list = packageManager .getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES); for (int n = 0; n <…continue reading →