1.

When using setDuration() for a Toast, is it possible to set a custom length or at least something longer than Toast.LENGTH_LONG?

Answer»

For sharing data from ONE application to another application we are using Content Provider in android.  Other application can access data from Content Provider using the provider client object. These provider client object providing an interface between application to access data and handle inter-process communication. Content Provider is saving data in the form of TABLES. These tables are having the same schema as relational database tables.

To access the data from the content provider, we use the ContentResolver client object. ContentResolver PROVIDES basic methods RELATED to database storage. ContentResolver object and Content Provider objects are handling interprocess communication between application. The ContentResolver methods provide the basic create, retrieve, update, and delete functions of persistent storage.

To retrieve data from a content provider, we need to follow these steps:

  • Send Request the read access permission for the provider.
  • Write the code that sends a QUERY to the provider


Discussion

No Comment Found

Related InterviewSolutions