如何将 google plus 集成到 Android 应用程序
我想知道如何将 google plus 集成到我的应用程序中。目前我正在开发新闻应用程序,我希望在其中有一个新闻共享选项,例如 facebook、twitter、gmail 和 google plus。我怎样才能实现这个功能?
I want to know how to integrate google plus in my app. Currently I am developing news application, in which I would like to have a news sharing option for things like facebook, twitter, gmail, and google plus. How can I achieve this functionality?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Android方式的共享并不涉及服务的一一集成。这将要求您在您可能想要集成的新服务启动时随时更新您的应用程序。相反,您可以使用 ACTION_SEND Intent。
这篇博客文章很好地介绍了它的使用:http:// sudarmuthu.com/blog/sharing-content-in-android-using-action_send-intent
当您以这种方式实现共享时,您的用户可以使用他们设备上安装的任何应用程序进行共享。如果他们安装了一个可以接受共享意图的新应用程序,您的应用程序将立即能够与其集成,而无需您进行任何更改。 Google+ 应用程序接受这些共享意图。
Sharing the Android way doesn't involve integrating services one by one. That would require you to update your app any time a new service launches that you might want to integrate with. Instead you use the ACTION_SEND Intent.
This blog post gives a good intro to its use: http://sudarmuthu.com/blog/sharing-content-in-android-using-action_send-intent
When you implement sharing this way your users can share using any app they have installed on their device. If they install a new app that can accept sharing intents your app will immediately be able to integrate with it with no changes from you. The Google+ app accepts these sharing intents.
您可以使用 ShareCompat 轻松共享到 Google+,只需支持库即可。
http://googleplusplatform.blogspot.co .at/2012/05/sharing-rich-content-from-your-android.html
You can easily share to Google+ with ShareCompat, you only need the support library for that.
http://googleplusplatform.blogspot.co.at/2012/05/sharing-rich-content-from-your-android.html