如何启动一个已经投入生产的android / ios应用程序,如果不存在重定向到playstore / app商店?

时间:2017-04-19 10:32:10

标签: android

所以这个应用程序已经投入生产,现在我需要创建一个网页来检测应用程序是否存在。如果是这样,它将启动应用程序,如果没有,它将重定向到应用程序商店。

问题是,由于应用程序已经投入生产,我无法对manifest.xml进行任何更改以添加任何额外的意图。

如何使用javascript进行此操作?

我已检查过该应用的manifest.xml文件。如果它有用,这是摘录:

<intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="@string/CFBundleURLSchemes" />
</intent-filter>

3 个答案:

答案 0 :(得分:0)

我认为你需要再添加一行试试这个。

 <category android:name="android.intent.category.LAUNCHER" />

答案 1 :(得分:0)

答案 2 :(得分:0)

是的,这很好问题大多数人为此做了更多的事情 但是google-firebase提供了一个service,即“Dynamic Links”。

动态链接有很多用途但you can try it for your problem

让我们可以轻松设置

1)打开firebase并为其制作项目 之后选择动态链接选项。

enter image description here

2)在firebase中添加您的应用并完成配置。

enter image description here

使用您的Play-store网址设置

3)

并选择“定义Android的链接行为”选项。做任何你想要的。

enter image description here

完成所有流程后

4)

enter image description here

5)此生成的链接与 PACKAGE-NAME 相关 所以每当你点击网页链接从手机。它自动创建了两个选项。

  • 如果app在移动版开放应用中可用
  • 如果应用程序在您的应用程序的移动开放式Playstore中不可用。

快乐编码:)