Read Multiple Phone Numbers From Android Contacts List Programmatically

android-logoThis is how you can read multiple phone numbers, which are associated with a contact from your Android phone programmatically. If the contact has multiple phone numbers, then you can get all phone numbers and other details by using Android Cursor and ContactsContract class in Android. 

Singleton Design Pattern – A Creational Design Pattern


singleton design pattern

As the name suggest, Singleton means ‘Single Instance’.  As it is a creational design pattern so this design pattern provides the solution to create only one object (instance) of a class throughout the application’s life time.That means you can restrict the creation of an object of a given class by providing a static member function to create only one object for that class.

Creational Design Patterns


singleton design pattern

This design pattern provides the way to create an object of a class as per your project requirement. It means you can control the creation and life cycle of an object in your application.  As we have already discussed about different creational design patterns in my previous post, lets have a recall about  the creational patterns as below and then we will discuss different types of creational patterns in this post later.

Get Running Applications List in Android Example

get-installed-application-list-androidHere we will discuss about how to get running applications list in Android with an simple example. There are many applications and services which are running in your Android device. We can use  ActivityManager.getRunningTasks(Integer.MAX_VALUE) API to get list of all running tasks in Android.

Get Installed Applications List in Android Example

get-installed-application-list-androidHere you will find the simplest way to get installed applications list in Android Phones. We can retrieve all installed applications list using PackageManager and ResolveInfo in Android. ResolveInfo and PackageManager are Android components which provides us all installed applications details as per our requirement.

Send Email From an Android Application programmatically


Here we will discuss about how to send Email from an Android application programmatically. Simple we will use Intent.ACTION_SEND action with an existing email client like (gmail or something else) to send the email. Here in our example we will take inputs from user ( like To, Subject, Message) and will send it by invoking any of the existing email client, which is already installed in your device.