Hi Guys,
I've written my own ContentProvider, which works, except for the
URI_MATCHER.
URI_MATCHER returns -1, when it should give me 1.
First, I add my URI, so that the matcher is able to recognize it:
URI_MATCHER.addURI(Crowd.CROWD_AUTHORITY, "/Crowd", CUSTOMER);
At this point:
is Crowd.CROWD_AUTHORITY = "lan.tiptop.android.CrowdProvider"
and CUSTOMER = 1
At some points in the code it's necessary to check the URI:
if (URI_MATCHER.match(uri) != CUSTOMER) {
throw new IllegalArgumentException("Unknown URI: " + uri);
}
The if-statement throws this exception:
"Unkown URI: content://lan.tiptop.android.CrowdProvider/Crowd"
I think the URI ist correct and URI_MATCHER should give me 1.
Does anybody know, how to solve this?
Regards,
Frank
P.S.: I use version 0.9 of the SDK.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---