Action Send Intent for Image未显示所有共享选项

时间:2014-03-23 02:56:08

标签: android

出于某种原因,当我尝试以下操作发送意图时,它会直接进入消息页面并附上图片,而不是首先显示电子邮件,消息等选项......

            File pic =  new File(Environment.getExternalStorageDirectory(), "pictures.jpg");
            Uri pngUri = Uri.fromFile(pic);
            Intent picMessageIntent = new Intent(android.content.Intent.ACTION_SEND);  
            picMessageIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
            picMessageIntent.setType("image/*");  
            picMessageIntent.putExtra(Intent.EXTRA_STREAM, pngUri);
            startActivity(Intent.createChooser(picMessageIntent, "Send your picture using:"));  

0 个答案:

没有答案