Android content provider-create a content provider (intent object and data access)

Source: Internet
Author: User

ApplicationProgramYou can use an intent object to indirectly access a content provider. The application does not call any contentresolver or contentprovicer method. On the contrary, it sends an intent object to the activity that starts it. This intent object is usually part of its own application. The target activity obtains and displays data in its UI. Depending on the action in intent, the target activity can also prompt the user to modify the data of the provisioner. The intent object can also contain the additional data displayed by the target activity in the UI. Then, before you use it to modify the data in the provisioner, you have the option to change the data.

You may want to use the access to the intent object to ensure data integrity. Your providers may rely on strictly defined business logic to insert, update, and delete data. If so, allowing other applications to directly modify data may result in invalid data. If you want developers to use intent objects for access, you must have detailed documents to explain to them why intent objects are used for access in their own application UI.CodeTo modify data.

Processing an input intent object for which you want to modify the data of the provider is different from processing other intent objects, in the "Intents And intent filters" topic, you can learn more about using intent objects.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.