Cross-application access contentprovider

Source: Internet
Author: User

The first thing to note is whether the insert location is the application's sqllite database.


650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4B/68/wKiom1QrwGmgGPKbAARzu3OekOA605.jpg "Title =" 16.16.jpg "alt =" wkiom1qrwgmggpkbaarzu3oekoa605.jpg "/>



650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4B/6A/wKioL1QrwM_BsiI-AACYheX4eu8220.jpg "Title =" courier 17.jpg "alt =" wKioL1QrwM_BsiI-AACYheX4eu8220.jpg "/>
Idea: The provider provides an accessible Uri, which is then accessed externally. If it matches the URI provided internally. Returns an operation.


650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4B/6A/wKioL1Qryr2zv2tXAAA-lbRAiqs342.jpg "Title =" 1818.jpg "alt =" wKioL1Qryr2zv2tXAAA-lbRAiqs342.jpg "/>


First, write the provider (including code and configuration). The following is the configuration.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4B/68/wKiom1Qry22BPuzMAAPEqLS4WzA150.jpg "Title =" 1919.jpg "alt =" wkiom1qry22bpuzmaapeqls4wza150.jpg "/>

Then, you can directly put what you need in the parser's code.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4B/6A/wKioL1Qry-DQvy9iAAIKbP09WS4280.jpg "Title =" jpg "alt =" wKioL1Qry-DQvy9iAAIKbP09WS4280.jpg "/>


In the provider, pay attention

1. instantiate helper

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4B/68/wKiom1QrzEPy8MhtAAKOX6W6fiA789.jpg "Title =" courier 21.jpg "alt =" wkiom1qrzepy8mhtaakox6w6fia789.jpg "/>


2. You need to write the required identifiers (low-level errors because a single record is required here)

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4B/6A/wKioL1QrzQ6AMKcQAAN1LPlPKhI568.jpg "Title =" courier 22.jpg "alt =" wkiol1qrzq6amkcqaan1lplpkhi568.jpg "/>


Final Result

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4B/6A/wKioL1QrzhrgR8VNAAEYoRtdu-8804.jpg "Title =" courier 23.jpg "alt =" wKioL1QrzhrgR8VNAAEYoRtdu-8804.jpg "/>


Cross-application access contentprovider

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.