Android: Gradle First Look

Introduction Gradle favors convention over configuration. It means, Gradle provides default values for settings and properties. This makes Gradle very easy to get started with. However, if you would like to change/override Gradle default settings and properties, you can do that easily. Gradle uses Groovy DSL (Domain Specific Language) as it's configuration lanugage. Groovy is … Continue reading Android: Gradle First Look

Android: Instrumentation Testing using Espresso

Introduction Android provides a number of extra components beyond Java, for example, Activity, Service etc. Testing these extra components you will be required Instrumentation testing and it needs to be run on device/emulators. Espresso is an official instrumentation testing framework by Google. Installation Add this line in app level build.gradle in dependencies add this line … Continue reading Android: Instrumentation Testing using Espresso

Android: SharedPreferences

There are several data storage options in Android. Such as, Shared Preferences Stores primitive data types (int, String, float, boolean) Stores as key-value pair Not accessible to other applications Internal Storage Stores data inside apps private storage Not accessible to other applications External Storage Stores data on shared external storage (SD Card) Accessible to other … Continue reading Android: SharedPreferences

Demo contacts for Android emulator/genymotion

When we create an emulator or genymotion device, it is kind of blank. What if we need a list of contacts to experiment with. In that case we have two options We can use our PERSONAL device. urgh! We can insert a bunch of demo contacts into emulator/ genymotion. Cons What if we accidentally delete/call/send … Continue reading Demo contacts for Android emulator/genymotion

Android Library: Gson (Usage and Example)

Serialization Serialization is a process of writing the state of an object into a byte stream. Similarly, deserialization is the process of turning the byte stream into an object. Installation You can get the latest version of Gson library from here. Right now the latest version is 2.7. Click on the version from the link … Continue reading Android Library: Gson (Usage and Example)

Android: Speed up Gradle build process in Android Studio

These techniques will help you to make the Gradle build process faster. Technique #1 Open up file add the following line org.gradle.daemon=true Side effects Gradle daemon is a background process. If you use this, it might take (300-400) MB memory or more from your system. After adding the above line, try to Rebuild the … Continue reading Android: Speed up Gradle build process in Android Studio

Using Android Studio to increase productivity

Android Studio has been released officially. A couple of bug fix releases have already been rolled out since the first stable release. You can download the latest stable version from here. There are 3 more release channels along with Stable channel. Namely, Canary channel: rough edges build Dev channel: slightly more stable than Canary Beta … Continue reading Using Android Studio to increase productivity