调用系统程序打开指定的图片
1
File file = new File(advInfo.strFullImagePath);
if( file != null && file.isFile() == true){
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(file), "image/*");
SNAdvView.this.getContext().startActivity(intent); }
}
2
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("file://"+chosenPicFile), "image/*");
startActivity(intent);
ps:分别setData和setType会失败。