WHAT IS AN INTENT? CAN IT BE USED TO PROVIDE DATA TO A CONTENTPROVIDER? WHY OR WHY NOT?

Mayank Tripathi

Total Post:807

Points:4035
Posted by  Mayank Tripathi
 983  View(s)
Ratings:
Rate this:
  1. Mayank Tripathi

    Post:807

    Points:4035
    What is an Intent? Can it be used to provide data to a ContentProvider? Why or why not?

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!