help with Content provider

百般思念 提交于 2019-12-25 02:24:36

问题


I've been working on this content provider for a few days now, and I've been looking for answers online.

Could someone please clarify for me.

I am trying to transfer my android sqlite DB from one app to another, and I want to use the content provider. I have it written out, but it is not working.

My question is, does the content provider and the CONTENT_URI go in the same package of the source app? And then I call to it from the other app?


回答1:


Yes, content provider and the CONTENT_URI can go in the same package of the source app. For the other app to call to it, you will have to have the same CONTENT_URI and then, the content resolver will do the rest for you.



来源:https://stackoverflow.com/questions/7348900/help-with-content-provider

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