我想分享圖片和文字到另一個應用程序,但我發現,當我使用此代碼,請幫助文件格式不支持其他應用程序...分享圖像使用意圖在android系統
Uri picUri = Uri.parse("http://www.planwallpaper.com/static/images/image-slider-2.jpg");
Intent shareIntent = new Intent();
shareIntent.setAction(android.content.Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_TEXT, "Hi There...");
shareIntent.putExtra(android.content.Intent.EXTRA_STREAM, picUri);
shareIntent.setType("*/*");
startActivity(Intent.createChooser(shareIntent, "Share Image...."));
爲什麼不分享URI作爲一個字符串? –
我試過它不起作用@Nilesh發佈的波紋管代碼作品 –