问题描述
我有一种方法可以将图像共享到应用程序的目标列表中,并且正在尝试将图库添加到列表中,以便将图像保存在本地
File newFile = new File(imagePath,"image.png");
Uri contentUri = FileProvider.getUriForFile(this,BuildConfig.APPLICATION_ID + ".provider",newFile);
if (contentUri != null) {
Log.d(TAG,"shareImage: GOOD URI");
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT,"Created in NotanIzer.");
sendIntent.putExtra(Intent.EXTRA_STREAM,contentUri);
sendIntent.setType("image/*");
Intent shareIntent = Intent.createChooser(sendIntent,null);
startActivity(shareIntent);
hideSpinner();
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)