不推荐使用PlusShare类。有没有其他方法可以通过android应用程序在google Plus上共享?

不推荐使用PlusShare类。有没有其他方法可以通过android应用程序在google Plus上共享?,android,google-plus,Android,Google Plus,我想将Google plus集成到我的android应用程序中,并将我的应用程序中的帖子分享给Google plus。为此,我遵循它的原则。在该文档中,给出了在google plus上共享的以下代码: Intent shareIntent = new PlusShare.Builder(this) .setType("text/plain") .setText("Welcome to the Google+ platform.") .setContentUrl

我想将Google plus集成到我的android应用程序中,并将我的应用程序中的帖子分享给Google plus。为此,我遵循它的原则。在该文档中,给出了在google plus上共享的以下代码:

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);
但是,问题是
PlusShare
类已被弃用。所以,我的问题是,有没有其他方法或方式在Google Plus上共享帖子?

注意:从我的应用程序中共享帖子非常有效


我找到了另一种方法。 这是以下面的方式

Intent shareIntent = ShareCompat.IntentBuilder.from(this)
                .setText("your Text")
                .setType("text/plain")
                .getIntent()
                .setPackage("com.google.android.apps.plus");

startActivityForResult(shareIntent, GOOGLE_REQUEST_SHARE);

我找到了另一种方法。 这是以下面的方式

Intent shareIntent = ShareCompat.IntentBuilder.from(this)
                .setText("your Text")
                .setType("text/plain")
                .getIntent()
                .setPackage("com.google.android.apps.plus");

startActivityForResult(shareIntent, GOOGLE_REQUEST_SHARE);