在我的应用程序中,我想从文件夹中获取加密图像并将其显示在图库中,当我单击要发送解密图像的图像时,我正在使用代码共享图像。
boolean share = false;
share = true;
if (share)
{
try
{
List<String> FileList = tFileList;
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.setType("*/*");
sendIntent.setClassName("com.android.mms", "com.android.mms.ui.ComposeMessageActivity");
System.out.println("Global Position"+globalPosition);
final File file1 = new File(FileList.get(globalPosition).toString());
Uri uri = Uri.fromFile(file1);
Log.e("Path", "" + uri);
sendIntent.putExtra(Intent.EXTRA_STREAM, uri);
startActivity(Intent.createChooser(sendIntent, ""));
share = true;
} catch (Exception e)
{
share = false;
}
}
else
{
share = false;
Log.e("Path", "File Error");
}
return share;