Create a ContentProvider
ContentProvider is an interface for unified publishing data, and all programs can use Contentresolver to receive data
1. Create a contentprovider that needs to be extended from the abstract class
public class Mycontentprovider extends ContentProvider
2. Register in the Mainifest file and set a android:authorities= "package name address";
3. Publish the URI address of the ContentProvider
Public Static Final Uri Content_uri = uri.parse ("Content://com.rain.bus/mycontentprovider");
A contentresolver may query all rows through Content://com.rain.bus/mycontentprovider, or use content://com.rain.bus/ MYCONTENTPROVIDER/5 to access specific rows, it is best to determine both of these form of request, and the simplest approach is to use a urimatcher to determine whether to request all data or to request a single row of data.
Cond...
Android Learning _contentprovider