深度链接分享到Google+,但链接什么都不做



我正在尝试使用从Google+到Android应用程序的深度链接,如下http://developers.google.com/+/mobile/android/share/dept-link。

我可以分享到Google+。帖子中的链接是"可点击的"(在触摸时会突出显示),但在发布时没有任何作用。此外,该帖子还包含一行可疑的"未定义"文字。

样品http://raw.github.com/concreterose/TestDeepLink/master/README_ASSETS/sample_share.png

我已经在谷歌开发者控制台项目凭据中启用了深度链接。

我使用的是Scopes.PLUS_LOGIN创建的登录PlusClient,通过:发布

Intent shareIntent = new PlusShare.Builder(this, plusClient)
.setText("Testing deep link")
.setType("text/plain")
.setContentDeepLinkId("deeplink",
"title",
"description",
Uri.parse(thumbnailUrl))
.getIntent();
startActivityForResult(shareIntent, 0);

我不确定我是否需要所有这些,但在努力使事情正常工作时,我有:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />

处理活动(作为清单中的第一个活动给出):

<activity android:name=".ParseDeepLinkActivity">
<intent-filter>
<action android:name="com.google.android.apps.plus.VIEW_DEEP_LINK" />
<data android:scheme="vnd.google.deeplink" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>

是:

public class ParseDeepLinkActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.i(TAG, "onCreate");
throw new RuntimeException("got here");
}
}

我正在使用发布密钥库进行构建,并在运行4.4的几个实际设备上进行测试。

我试过:

  • 使用PlusShare.Builder(activity)构造函数(没有plusClient),没有更改。

  • 用CCD_ 3代替CCD_。没有"行动呼吁"按钮,点击帖子会进入uri,而不是深度链接。

  • 三重检查"深度链接:已启用"是否在开发人员控制台中正确设置。

  • 没有前卫的建筑,没有变化。

  • 卸载应用程序,然后点击链接(应该打开播放商店条目),什么也没做。

  • 使用其他密钥签名。Plus登录失败(如预期)。

  • 使用不同版本的播放服务(4.0.30 vs 3.2.+)。

  • adb shell setprop log.tag.GooglePlusPlatform VERBOSE不生成任何日志消息。

  • 获取我的API访问令牌并验证它是否具有auth/plus.login,确实如此。

有人能告诉我我做错了什么吗?谢谢

更新:这现在正在工作,显然是通过Google Play Services更新修复的。

这是一个已知的问题,将在下一次Google+更新中修复:

android上的Google+Interactive股票在版本4.2.4.58179886 中被打破

通常最好共享用schema.org标记的URL,而不是传递标题、描述和图像。因为没有URL,链接在网络上永远无法点击(你需要使用setContentURL才能点击),但它应该在Android上打开应用程序。

也就是说,未定义确实看起来很可疑。有两件事令人担忧,第一件是链接不起作用,第二件是描述通常不再显示在常规共享中。安卓系统的交互式帖子有一个已知的问题,希望能在新年早些时候得到解决,我想知道这是否也会影响深度链接的共享。

为了缩小范围,您可以尝试在setContentURL中使用schema.org标记的URL进行测试吗(例如。https://developers.google.com/+/web/sippet/examples/thing),并在setContentDeeplink调用中为title、image和description传递null?

最新更新