Home > DeveloperSection > Interviews > What is an Intent? Can it be used to provide data to a ContentProvider? Why or why not?

Posted on    August-04-2015 2:45 AM

 Android Android  Android Intent  Android ContentProvider 
Ratings:
 1 Answer(s)
  498  View(s)
Rate this:

Mayank Tripathi
Mayank Tripathi

Total Post:807

Points:4035
Posted on    August-04-2015 2:45 AM

The Intent object is a common mechanism for starting new activity and transfering data from one activity to another. However, you cannot start a ContentProvider using an Intent.

When you want to access data in a ContentProvider, you must instead use the ContentResolver object in your application’s Context to communicate with the provider as a client. The ContentResolver object communicates with the provider object, an instance of a class that implements ContentProvider. The provider object receives data requests from clients, performs the requested action, and returns the results.

Don't want to miss updates? Please click the below button!

Follow MindStick