我正在尝试制作一个仅在图库视图中显示特定文件夹中的图像的小应用程序。
Uri targetUri = Media.EXTERNAL_CONTENT_URI;
String folderPath = Environment.getExternalStorageDirectory().toString() + "/DCIM/";
int folderBucketId = folderPath.toLowerCase().hashCode();
targetUri = targetUri.buildUpon().appendQueryParameter("bucketId", String.valueOf(folderBucketId)).build();
在initializeDataSource()
// Creating the DataSource objects.
final LocalDataSource localDataSource = new LocalDataSource(Gallery.this, targetUri.toString(), false);
但我有错误
"Error finding album " + bucketId);
在CacheService.loadMediaSets.
:
Log.e(TAG, "Error finding album " + bucketId);
我怎样才能解决这个问题?谢谢