问题
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