Reputation: 748
Here is how I'm sharing using Google+ app's ShareActivity. I wanted to know if I can just avoid this one extra step and directly post from my app's UI? Thanks.
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);
Upvotes: 1
Views: 179
Reputation: 19960
There isn't a API available for post directly to Google+ - the ShareActivity is the preferred option as it gives the user the ability to choose which circles they want to share with.
You can write user actions directly to Google+ using App Activities: https://developers.google.com/+/mobile/android/app-activities - these don't show up in the users stream directly however.
Upvotes: 2