使用Android SDK中不被分享意向共享照片谷歌加不被、意向、照片、Android

2023-09-05 00:43:02 作者:无人及你

我已经将使用Google+的Andr​​oid SDK和能够得到PlusClient对象也是如此。 我这里接到基本信息。在底部的同一页面上,有从那里我得到了以下code的共享内容的另一个链接互动职。但它打开的对话​​框,然后分享它。

I have integrated Google+ using its android sdk and able to get PlusClient object as well. I got basic information from here. In the same page at bottom there is another link for interactive post from where i got the below code which share the content. But its opening dialog and then share it.

code: -

Button shareButton = (Button) findViewById(R.id.share_button);
shareButton.setOnClickListener(new OnClickListener() {
    @Override
    public void onClick(View v) {
      // Launch the Google+ share dialog with attribution to your app.
      Intent shareIntent = new PlusShare.Builder(this)
          .setType("text/plain")
          .setText("Welcome to the Google+ platform.")
          .setContentUrl(Uri.parse("https://developers.google.com/+/"))
          .getIntent();

      startActivityForResult(shareIntent, 0);
    }
});

我的情况是不同的,因为我有图片和文字已经和我在我的应用程序,我只是想无需任何用户交互(除用户登录/ SIGIN谁愿意股吧)在Google+上分享。和共享照片+文字,我会删除后/清除用户的登录名。所以,我只是想问问用户的身份验证和份额不应该出现的对话框。将有一个单独的按钮名称分享到G + 点击该按钮的应用程序会要求用户进行身份验证和共享已经选定由用户照片+文字。

My case is different as I have Image and Text already with me in my app, i just want to share them on the Google+ without any user interaction (except the login/sigin of user who wants to share it). And immediately after sharing the photo+text i will remove/clear the login of the user. So i only want to ask user for the authentication and the dialog for share should not appear. There will be a single button name Share on G+ by clicking that button app will ask user for authentication and share the photo+text already selected by user.

IMP注: - 只有用户验证的弹出应显示有后必须共享照片+无需任何用户交互文本

我需要在此方面的指导,我已经集成了Android的SDK,我也有工作,现在唯一的事情是分享而无需用户交互。请,如果任何人有这个好心帮任何想法/指引我。

I need some guidance on this as i have already integrated the android-sdk and i also have it working, Now only thing is sharing without user interaction. Please if anyone has any idea on this kindly help/guide me.

推荐答案

这是不可能的。分享到Google+必须始终为用户启动,最终使一个更好的用户体验,当其他用户看到你的应用程序中的份额 - 他们知道,它有上下文他们

This is not possible. Sharing to Google+ must always be user-initiated, which ultimately makes for a better user experience when other users see a share from your app--they know that it has context for them.

用户交互实际上是pretty的微乎其微。一旦他们打了共享按钮,他们将采取到已经有pre-填充内容的共享对话框。他们可以添加评论,有些人,他们认为会喜欢的职位,这就是它。

The user interaction is actually pretty minimal. Once they hit the Share button, they will be taken to a share dialog that already has the content you have pre-populated. They can add a comment and some people they think would enjoy the post, and that's it.