Content Provider Example using two android applications

折月煮酒 提交于 2019-12-01 14:16:07

here i found some examples/tutorial for you, Please have a look , below tuts include everything you can do to create content provider.

Android Fundamentals: Working With Content Providers .

example1

Assuming that you have a database and a content provider in your application.... You can use the database of other application if it is exported. To export your database you just need to set the value of android:exported attribute of Provider tag to true in android.manifest file

    <provider
        android:exported="true"
        android:name="<content provider>"
        android:authorities="<content provider authority>" >
    </provider>

In the other application's Android.Manifest file provide the permission to access the content provider.

see the links below for more informationContent Providers and Using Content Providers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!