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)