issue on sdcard in sdcard
i need to retrieve the images from sdcard,i used the following code.
String[] projection = {MediaStore.Images.Thumbnails._ID};
cursor = managedQuery( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI,
projection,
null,
null,
MediaStore.Images.Thumbnails.IMAGE_ID);
columnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Thumbnails._ID);
int s开发者_开发问答ize = cursor.getCount();
but the cursor always returns Zero.so i cann't get image from sdcard .whats the solution.
Do you add the permisson to your XML code?
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
精彩评论