Archives for Articles - Page 6

Android

How to check if internet connection is enabled in Android ?

Today, a simple article exposing a snippet code lets you to know if user’s internet connection is enabled in Android. It can be very important to know if user is connected before to send internet requests that are useless. First, you must add following permissions to your Android Manifest : <uses-permission android:name="; /> <uses-permission android:name="; /> I presume that you…
Continue Reading
Articles

Is Java pass parameters by value or by reference ?

Today, we go back to the basics and we’re going to understand to a simple but sometimes hard to answer for some developers. Are Java parameters passed by value or by reference ? Before to answer, it seems important to define what is the difference between these two kinds of methods to pass arguments in methods. From Wikipedia, we get the…
Continue Reading
Articles

First steps with Android Studio IDE

Like you must know, Google officially announced the first release of Android Studio recently. So, Android Studio is the official Android Studio IDE ! Time is come to migrate from Eclipse with ADT (Android Development Tools) to Android Studio IDE. 1. Installation Go on the following URL :   and start to download the Android Studio IDE for your OS. Once…
Continue Reading

How to close and hide the Android software keyboard ?

In an application, when you wait for users input you must use EditText wigdets. When users end their inputs and click OK button, you would like close the Android software keyboard. It's better than asking to users to close software keyboard themselves. Use that snippet code : EditText myEditText = (EditText) findViewById(); InputMethodManager imm = (InputMethodManager) getSystemService(); ((), 0);  …
Continue Reading

How to record your screen on Android ?

Android KitKat has introduced the possibility to record the screen of your device but not programmatically. The ability to record the screen of your device comes with an external tool added in ADB (Android Debug Bridge). The ADB is a tool used by developers along with the Android SDK to communictate with a device at the command line level. Record…
Continue Reading
Articles

Discover Jack and Jill for Android !

Last week, Google announced the first version of a new experimental toolchain for Android. This new toolchain is designed to improve build times and simplify development by reducing dependencies on others tools. This new toolchain is named Jack (Java Android Compiler Kit) and Jill (Jack Intermediate Library Linker). These two tools are at the core of the build process. How…
Continue Reading
Articles

What are differences between px, dp and sp in Android ?

Today, a brief reminder about Android dimensions. When you create the UI layouts of your application, you're used to define dimensions with units like dp (density-independent pixels), dip or sp (scale-independent pixels). Other units supported are pt (points), px (pixels), mm (millimeters) and in (inches) where as this second kind of units is not recommended because not independent from devices…
Continue Reading