[android-developers] Re: UriMatcher "match" not working properly

2010-09-10 Thread Arpit
I had not copied the code here, but re-wrote it in the post. This miss was because I made mistake while typing. And I got -1 cause my content provider was getting registered. It was not a problem Now I will write the test case as you said and it will also help me fix the code properly. Basically

[android-developers] Re: UriMatcher "match" not working properly

2010-09-09 Thread A. Elk
I missed the mismatch as well; it's subtle. In your manifest, you set the authority to com.arpit.providers.MyContentProvider, while in the code you set it to com.arpit.provider.MyContentProvider. Note the missing "s" for provider in the code. The ContentResolver shouldn't be able to resolve your pr

[android-developers] Re: UriMatcher "match" not working properly

2010-09-09 Thread Arpit
Hi Elk, Thanks again for your time and specifying your points. Finally I found out the problem why the code wasn't working after lot of debugging. Turned out that the table name and the Uri given was wrong. A stupid typo was the issue. Also, sorry I can't post the original code as I am under lega

[android-developers] Re: UriMatcher "match" not working properly

2010-09-09 Thread A. Elk
As far as I can tell from what you've posted, you're declaring CONTENT_URI as a String or some sort of string-related immutable class. If you look at the NotePad example, CONTENT_URI is of type Uri, and it's constructed using Uri.parse. You may be doing this, but what you've posted doesn't indicat

[android-developers] Re: UriMatcher "match" not working properly

2010-09-09 Thread Brion Emde
You should not hijack existing threads with new questions that do not correspond to the original thread. That makes it very difficult for people to find the original thread. Instead, you should start a new thread with your question. That said, I see that the value of the AUTHORITY that you declare