[英]how to share captured photo to using Adding an Easy Share Action in android?
我正在我的應用程序中進行照片共享。因為我正在使用添加一個簡單的共享Action.it在操作欄中只顯示圖標,而不是選項。所以請給我一些例子。
http://developer.android.com/training/sharing/shareaction.html
Easy Share是自動填充; 你只需要告訴ShareActionProvider你將分享哪些內容。
其中大部分內容都是在您提供的API鏈接中共享的,但如果您的目標是為要共享的圖像填充列表,則需要包含此鏈接。
Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("image/*");
Uri uri = Uri.fromFile(new File(getFilesDir(), "foo.jpg"));
shareIntent.putExtra(Intent.EXTRA_STREAM, uri.toString());
現在, shareIntent已設置為image,它將使用相關應用程序填充列表,例如instagram,facebook或PhotoShop。
當您調用shareIntent.setType時,應用程序將在此處找到的類型之一中以MIME類型( 多用途Internet郵件擴展名 )查看圖像。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.