使用应用链接启动即时应用

时间:2017-11-10 07:46:49

标签: android deep-linking applinks android-instant-apps

我创建了一个即时应用,我为其创建了应用链接。 我在有效网站上托管了assetlinks.json 我的网站名称如下:
https://instantappsbase.firebaseapp.com
assetlinks.json通过生成的调试版数字签名在上述网站上托管:
https://instantappsbase.firebaseapp.com/.well-known/assetlinks.json
我添加了一项功能,可以使用消息“Hello World”启动活动。
我尝试按照“URL-mapping editor”中的配置调用以下活动: https://instantappsbase.firebaseapp.com/hi
我在我的手机和模拟器的浏览器中尝试了上面的URL,它不起作用。
当我尝试通过以下方式调用意图时:

      Intent intent = new Intent(Intent.ACTION_VIEW,
            Uri.parse("https://instantappsbase.firebaseapp.com/hi"));<br>
    intent.setPackage(getPackageName());
    intent.addCategory(Intent.CATEGORY_BROWSABLE);
    startActivity(intent); 

这工作正常。
但是当我试图通过浏览器打开它时它不起作用。它会显示“PageNotfound错误
有没有一种方法可以让我们在没有通过谷歌游戏商店上传我们安装的应用程序和即时应用程序的情况下工作。
还是我错过了这个流程中的一些东西。 任何人都可以帮我解决这个问题吗?

先谢谢。

1 个答案:

答案 0 :(得分:1)

该应用必须在Play商店中发布。