Re: [android-developers] Re: ContentResolver.query return null android

2012-12-13 Thread Hilda Chen
Thanks Chris. It is my mistake. There misses a 'break' in switch in function of provide code. I am so sorry. 2012/12/12 Chris Mawata chris.maw...@gmail.com Are you sure the uri coming into the method is not null? On Tuesday, December 11, 2012 10:19:13 PM UTC-5, Hilda Chen wrote: public int

[android-developers] Re: ContentResolver.query return null android

2012-12-12 Thread Chris Mawata
Are you sure the uri coming into the method is not null? On Tuesday, December 11, 2012 10:19:13 PM UTC-5, Hilda Chen wrote: public int getCount(Uri uri){ Cursor c=null; int size=0; if(uri.equals(DatabaseContants.CONTENT_URI_SETTING)){

[android-developers] Re: ContentResolver.query return null android

2012-12-11 Thread Hilda Chen
public int getCount(Uri uri){ Cursor c=null; int size=0; if(uri.equals(DatabaseContants.CONTENT_URI_SETTING)){ c=mContentResolver.query(uri, DatabaseContants.COLUMNS_SETTING,null, null,null); } else