每天进步一点
MyContentProvider extends ContentProvider
需要实现它的方法
配置如下:
<provider android:name=".MyContentProvider"
android:authorities="com.wang">
</provider>
android:authorities即指定了其它的应用访问它的URI
在另一个应用中可以使用:
ContentResolver r = getContentResolver();
Cursor c = r.query(Uri.parse("content://com.wang"), null, null, null, null);
这样就得到了前一个应用的数据了
MyContentProvider extends ContentProvider
需要实现它的方法
配置如下:
<provider android:name=".MyContentProvider"
android:authorities="com.wang">
</provider>
android:authorities即指定了其它的应用访问它的URI
在另一个应用中可以使用:
ContentResolver r = getContentResolver();
Cursor c = r.query(Uri.parse("content://com.wang"), null, null, null, null);
这样就得到了前一个应用的数据了