2013-08-19 24 views
1

以下是我使用Google+應用的ShareActivity分享的方式。我想知道如果我可以避免這一個額外的步驟,並直接從我的應用程序的用戶界面發佈?謝謝。如何在不使用ShareActivity的情況下直接更新Google+狀態?

Intent shareIntent = new PlusShare.Builder(this).setType("image/jpeg") 
        .setText(status.getText().toString()) 
        .setContentUrl(Uri.parse("https://developers.google.com/+/")) 
        .setStream(Uri.fromFile(image)) 
        .getIntent() 
        .setPackage("com.google.android.apps.plus"); 

      startActivityForResult(shareIntent, 0); 

回答

2

沒有直接到Google+,可用於後一個API - 的ShareActivity是更好的選擇,因爲它使用戶能夠選擇他們希望與之分享的圈子的能力。

您可以使用應用活動直接將用戶操作寫入Google+:https://developers.google.com/+/mobile/android/app-activities - 但這些操作並不直接顯示在用戶流中。

相關問題