本文介绍了我的Android应用程序中的Android谷歌加集成提供了android.content.ActivityNotFoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在google plus上共享文本和图像,例如facebook和twitter,但是当我将google plus集成到我的Android应用中并运行它时,它会出现异常:

I want to share text and images on google plus like facebook and twitter but when I integrate google plus in my Android app and run it it gives exception:

我遵循 https://developers.google.com/+/mobile/android/getting-started 指南.

推荐答案

要在Google+上共享,您有两个选择:

To share on Google+, you have two options:

  1. 通过App活动进行程序共享.但是,这是有限的,因为您不能共享文本和图像,而只能共享URL和操作.有关步骤,请访问 https://developers.google.com/+ /mobile/android/app-activities .

您可以通过Interactive Post启用用户启动的共享.对于这些,您可以通过设置setText参数来预填充帖子的文本.您不能直接共享照片,但是可以在页面的架构标记中设置图像,以使其包含在共享的代码片段中.您可以在 https://developers.google.com/上了解有关添加共享按钮的信息. +/mobile/android/share#adding_interactive_posts .有关setText参数的信息,请查看 https://developer.android.com/reference/com/google/android/gms/plus/PlusShare.Builder.html#setText(java.lang.CharSequence)

You can enable a user-initiated share with an Interactive Post. For these, you can prefill the text of the post by setting the setText parameter. You cannot share a photo directly, but you can set an image in the schema markup of the page so that it is included in the snippet of the share. You can learn about adding the share button at https://developers.google.com/+/mobile/android/share#adding_interactive_posts.And for information on the setText parameter, check out https://developer.android.com/reference/com/google/android/gms/plus/PlusShare.Builder.html#setText(java.lang.CharSequence)

这篇关于我的Android应用程序中的Android谷歌加集成提供了android.content.ActivityNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-01 11:18