robotoworks / mechanoid

Eclipse plugin providing a set of DSL's for the rapid development of Android apps
58 stars 26 forks source link

provider in library #257

Closed hannesa2 closed 10 years ago

hannesa2 commented 10 years ago

I've a library with mechanoid.jar and use an provider in AndroidManifest.xml

    <provider
        android:name="ab.cd.ef.communicate.sqlite.CDCommContentProvider"
        android:authorities="ab.cd.ef.communicate.sqlite.cdcomm"
        android:exported="false" />

An App A using this library works perfect. Now a second app B uses same library, but runs into an securtityexception meaning android:exported="true" is missing. But I want to share the data, each App should have it's own sqlite-db.

Do you have an idea, how to handle a library, where each app has it's own sqlite-db using this lib ? Thank you !

fluxtah commented 10 years ago

Not sure I understand the question but if you are using mechanoiddb in a library and want to link the library from multiple apps then the authority needs to be unique to each app for both apps to coexist.

I could be wrong but this section in the docs might help http://robotoworks.com/mechanoid/doc/db/api.html#overriding-the-default-provider-authority

hannesa2 commented 10 years ago

it's exactly my problem ! thank you for the solution