如何上传在一个岗位在Google+上G + Android SDK中多张照片? [英] How can I upload multiple photos in one post on Google+ from G+ Android SDK?

查看:158
本文介绍了如何上传在一个岗位在Google+上G + Android SDK中多张照片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何上传在一个时间直通照片谷歌加

I want to know how to upload multiple photos at a time thru google plus?

我发现如何上传一张照片,一个消息从谷歌加样code的时候。

I found how to upload one photo and one message at a time from google plus sample code.

String action = "/?view=true";
Uri callToActionUrl = Uri.parse(getString(R.string.plus_example_deep_link_url) + action);
String callToActionDeepLinkId = getString(R.string.plus_example_deep_link_id) + action;

// Create an interactive post builder.
builder = new PlusShare.Builder(this, plusClient);

// Set call-to-action metadata.
builder.addCallToAction(LABEL_VIEW_ITEM, callToActionUrl, callToActionDeepLinkId);

// Set the target url (for desktop use).
builder.setContentUrl(Uri.parse(getString(R.string.plus_example_deep_link_url)));

// Set the target deep-link ID (for mobile use).
builder.setContentDeepLinkId(getString(R.string.plus_example_deep_link_id),
        null, null, null);

// Set the message.
builder.setText("user message");

// Set the image
Uri uri = Uri.fromFile(new File("[user file path]"));
builder.setStream(uri);

任何人都知道如何上传多张照片,如Facebook和Twitter?

Anyone knows about uploading multiple photos like facebook and twitter?

推荐答案

它应与 addStream()的方法,可惜......这是行不通的。事实上,它使应用程序崩溃。

It should work with addStream() method, unfortunately... it doesn't work. Indeed it makes the application crash.

在一个漫长的寻找,我终于明白了:如果它使用简化的G + SDK是不可能的! (一个专门为Android的)。

After a long search, I finally got it: it's not possible if using the simplified G+ SDK! (the one dedicated to Android).

有第二个,包含在谷歌API的家庭,你可以找到有:

There is a second one, included in the Google API family that you can find there:

的http:// code.google.com / P /谷歌API的Java的客户端/维基/ API的#谷歌+ _API

这个人会让你建立更高级的职位,包括几个PIC之一。

This one will let you build more advanced post, included, several pic one.

不幸的是,第二SDK得多低的水平,而不是专注于Android的,它是一种抽象的Java通过HTTP请求。​​

Unfortunately the second SDK is much more low level, not dedicated to Android, it's a kind of Java abstraction over http request.

问候

这篇关于如何上传在一个岗位在Google+上G + Android SDK中多张照片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆