Category Archives: Tutorials
After received many requests from online users of my Android blog, I have posted the complete tutorial about the communication between activity and fragment Example. Here you can learn how a simple fragment can communicates with an Activity in Android. We will use simple getFragmentManager() API and Fragment Class in Android to complete this task .
Insert new contact in Android is very easy. Here we will learn how to add a new mobile number into Android Contacts list programmatically. We will use inbuilt Android classes (ContactsContract, ContentProviderOperation) to add new contacts in Android Contacts List. Below is the code snippet with example and detailed description.
It is very easy to retrieve phone numbers in Android. This is how you can read multiple phone numbers from Android Contacts List programmatically. If a contact has multiple phone numbers, then You can retrieve all phone numbers and other details using Android’s inbuilt classes (Cursor and ContactsContract ) in Android.
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.
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.