Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content Provider not accessible #37

Open
mide42 opened this issue Jan 21, 2015 · 1 comment
Open

Content Provider not accessible #37

mide42 opened this issue Jan 21, 2015 · 1 comment

Comments

@mide42
Copy link

mide42 commented Jan 21, 2015

I think that Tasquid's content provider "Astrid3ContentProvider" cannot be accessed by any app.

According to the manifest file this content provider has the following authority: "android:authorities="com.eztransition.tasquid".

However, in the static initializer block of class Astrid3ContentProvider the URIs added to the UriMatcher object are starting with "com.todoroo.astrid" as defined in constant API_PACKAGE of class AstridApiConstants. I think it was just forgotten to rename this constant when Astrid's source code was modified to obtain Tasquid.

I changed the value of constant API_PACKAGE to "com.eztransition.tasquid", and after this change the app ChBoSync (free SyncML client) was able to exchange data with Tasquid using this content provider. This is also described in ChBoSync's wiki, see section "Changes needed in the source code of Tasquid" on this page.

According to my understanding of Android's content providers the URIs accepted by a content provider have to start with the authority definied in the manifest for that content provider.

@mide42
Copy link
Author

mide42 commented Jan 24, 2015

Concerning the content providers offered by Tasquid: When building the app with a targetSDK of 4.3 (API-Level 18) or newer, then you have to explicitly set the attribute "android:exported" of the manifest's "provider"-tags to "true". The reason for this is that starting with API-Level 18 this attribute has no longer "true" as default value, see also this answer on stackoverflow.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant