Firstly we will open Android studio and then we will start a new Android studio project named 'ImplicitIntent'. And Company domain as 'com.example'.
We'll save Activity name as 'MainActivity' and Layout name as 'main' and then click on Finish.
Now our project will be created, and very first we have to create the interface. But before that we will open our manifest 'AndroidManifest.xml' file and add permission here because we want to work with native content provider,
Now we will design layout for this project, for that we will open 'main.xml', here we have simply added a button, and specified text, ID, height, gravity, and width.
Now we will open our main Java file in which will see that the code is default generated, now we will code here to access native content provider, for that we will first design a method,
private void ViewContacts()
Now we will design a Click Listener for this button,
public void onClick(View v)
Intent contacts=new Intent();
Now we will call this method,
Now we will execute this code and see how it works, when our application runs we will see a button named 'View Contacts' and when we click on that button we will be redirected to our Phone's contact list.
Have a friend to whom you would want to share this course?