简体   繁体   English

如何将google plus集成到Android应用程序中

[英]How to integrate google plus to Android application

I want to know how to integrate google plus in my app. 我想知道如何在我的应用中集成google plus。 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. 目前我正在开发新闻应用程序,其中我希望有一个新闻共享选项,如facebook,twitter,gmail和google plus。 How can I achieve this functionality? 我该如何实现此功能?

Sharing the Android way doesn't involve integrating services one by one. 共享Android方式不涉及逐个集成服务。 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 . 而是使用ACTION_SEND意图

This blog post gives a good intro to its use: http://sudarmuthu.com/blog/sharing-content-in-android-using-action_send-intent 这篇博文简要介绍了它的用法: 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. Google+应用会接受这些分享意图。

You can easily share to Google+ with ShareCompat, you only need the support library for that. 您可以使用ShareCompat轻松与Google+分享,您只需要支持库。

http://googleplusplatform.blogspot.co.at/2012/05/sharing-rich-content-from-your-android.html http://googleplusplatform.blogspot.co.at/2012/05/sharing-rich-content-from-your-android.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM