Intent sharingIntent = new Intent(Intent.ACTION_SEND);

//Uri uri = Uri.fromFile(new File(getRecordPath(),last_snapshot));
Uri screenshotUri = Uri.parse(檔案所在路徑);
//Log.d("uri",uri.toString());

sharingIntent.setType("image/*");
sharingIntent.putExtra(Intent.EXTRA_STREAM, screenshotUri);
startActivity(Intent.createChooser(sharingIntent, "Share image using"));

 

http://stackoverflow.com/questions/7661875/how-to-use-share-image-using-sharing-intent-to-share-images-in-android

http://sudarmuthu.com/blog/sharing-content-in-android-using-action_send-intent/

http://stackoverflow.com/questions/19218243/photo-share-intent-in-android

https://guides.codepath.com/android/Sharing-Content-with-Intents

http://stackoverflow.com/questions/19218243/photo-share-intent-in-android

arrow
arrow
    全站熱搜

    小彬彬 發表在 痞客邦 留言(0) 人氣()