当我执行以下代码时,我需要在 android 默认图像查看器中查看图像,它显示专辑列表而不是特定图像。请纠正我。
MediaScannerConnection.scanFile(this, new String[] {receiptPath}, new String[] {"image/*"}, new MediaScannerConnection.OnScanCompletedListener()
{
@Override
public void onScanCompleted(String path, Uri uri)
{
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
intent.setType("image/*");
startActivity(intent);
}
});