And that was the problem, indeed :-) Thanks! On Sep 27, 2:28 pm, Kostya Vasilyev <kmans...@gmail.com> wrote: > Make sure that whatever columns you wish to retrieve are included in the > projection, so that the content provider knows to fetch and return them to > your application. > > -- > Kostya Vasilyev --http://kmansoft.wordpress.com > > 27.09.2010 16:06 пользователь "Luca Carlon" <carlon.l...@gmail.com> написал: > > Hi! I'm trying to query the Android's MediaStore.Images.Media to get > the images contained in the device. I get my cursor on the DB like > this: > > Cursor cursor = > context.getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, > projections, selection, null, sortColumn); > > and I get the indices of the columns this way: > > int dataIdx = cursor.getColumnIndex(DATA); > ... > int idIdx = cursor.getColumnIndex(MediaStore.Images.Media._ID); > > unfortunately it seems that the column index idIdx is always -1, which > means the column doesn't exist. Am I doing something wrong? Is there > anyone else experiencing the same? > Thanks! > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group > athttp://groups.google.com/group/android-developers?hl=en
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en