2014-06-07 2 views
0

안드로이드 앱을 만들었습니다. 트위터에 드로어 블을 공유하고 싶습니다. 현재는이 방법으로 텍스트를 만들었지 만, 어떤 친구가 이미지를 의도에 첨부 할 수 있는지 말해 줄 수 있습니까? 트위터를 통해 공유, 사전에 감사합니다, 내 코드는 다음과 같습니다 :android에서 트위터 인 텐트로 드로어 블을 보내는 방법

public void shareTwitterIntent() { 
     String tweetUrl = "https://twitter.com/intent/tweet?text=3SManiquines"; 
     Uri uri = Uri.parse(tweetUrl); 
     startActivity(new Intent(Intent.ACTION_VIEW, uri)); 
    } 

답변

0

이 시도 (How to attach a Bitmap when launching ACTION_SEND intent에서 - 아마도 중복?) :

String pathofBmp = Images.Media.insertImage(getContentResolver(), bitmap,"title", null); 
Uri bmpUri = Uri.parse(pathofBmp); 
final Intent emailIntent1 = new Intent( android.content.Intent.ACTION_SEND); 
emailIntent1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
emailIntent1.putExtra(Intent.EXTRA_STREAM, bmpUri); 
emailIntent1.setType("image/png"); 
관련 문제