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

Advertisements

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: Speed up Gradle build process in Android Studio


These techniques will help you to make the Gradle build process faster. Technique #1 Open up gradle.properties 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

Android: Generate version name / version code / release apk file name automatically


Version code versionCode is an incremental integer variable. If you are using Git, then you can write a simple function in your build.gradle file this will return the commit number and ensures the incremental integer. Version Name For versionName you can maintain 3 global variable and combine them in a function, then return You can … Continue reading Android: Generate version name / version code / release apk file name automatically

Android: Push Notification (cloud to device messaging)


make a comment if you don't understand any step or need further clarification to complete a step Step 1: Register with Google apis Go to: https://code.google.com/apis/console/ Create a project => you will find a project Id in the URL, note the project id as SENDER_ID for example, https://code.google.com/apis/console/?pli=1#project:XXXXXXXXXXXX:access =================== Go to: Services => activate Google … Continue reading Android: Push Notification (cloud to device messaging)