2013-06-04 44 views
0

你好,我想用文字在谷歌加,但現在我無法找到例子和細節的來源,所以請幫我分擔圖像...感謝如何通過Android應用程序在Google Plus中共享圖像+文本而不使用意圖?

File tmpFile = new File("/path/to/image"); 
final String photoUri = MediaStore.Images.Media.insertImage(
    getContentResolver(), tmpFile.getAbsolutePath(), null, null); 

Intent shareIntent = ShareCompat.IntentBuilder.from(this) 
    .setText("Hello from Google+!") 
    .setType("image/jpeg") 
    .setStream(Uri.parse(photoUri)) 
    .getIntent() 
    .setPackage("com.google.android.apps.plus"); 

我有這樣的代碼,但我不能使用beacuse我想分享圖像+文本使用像Facebook和Twitter等sdk。

回答

相關問題