在Android中深层链接交互式帖子

时间:2014-08-04 10:16:18

标签: android google-plus

我正在试用Google plus示例项目的互动帖子。

private Intent getInteractivePostIntent() 
{
    String action = "/?view=true";
    Uri callToActionUrl = Uri.parse(getString(R.string.plus_example_deep_link_url) + action);
    String callToActionDeepLinkId = getString(R.string.plus_example_deep_link_id) + action;


    PlusShare.Builder builder = new PlusShare.Builder(this);
    builder.addCallToAction(LABEL_VIEW_ITEM, callToActionUrl, callToActionDeepLinkId);
    builder.setContentUrl(Uri.parse(getString(R.string.plus_example_deep_link_url)));
    builder.setContentDeepLinkId(getString(R.string.plus_example_deep_link_id),
            null, null, null);
    builder.setText(getString(R.string.inviteText));

    builder.setRecipients(recipients);

    return builder.getIntent();
 }

参加doc:

 plus_example_deep_link_url: is for desktop
 plus_example_deep_link_id: is for mobile

所以我正在尝试链接:https://play.google.com/store/apps/details?id=com.thinkleft.eightyeightsms.mms

 <string name="plus_example_deep_link_url">https://play.google.com/store/apps/details?id=com.thinkleft.eightyeightsms.mms</string>
<string name="plus_example_deep_link_id">com.abc.cdef</string>

我应该在deep_link_id中输入什么?即使我在那里输入随机文本,结果也会出现?

0 个答案:

没有答案