【问题标题】:How to link to apps on the myapplication in android如何链接到android中myapplication上的应用程序
【发布时间】:2017-04-26 11:28:18
【问题描述】:

我正在为商店应用程序创建一个 android 应用程序。我想要一个按钮,可以将人们带到使用电报共享应用程序。如果我使用标准链接

http://myappstoreuri/applink

android 打开浏览器,然后打开我的网站。

有什么想法吗?打开 myapplication 的 URL Scheme 是什么?

【问题讨论】:

    标签: android redirect share


    【解决方案1】:

    将 Intent 过滤器添加到您的 Manifest 文件中

            <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="http"/>
                <data android:host="myappstoreuri"/>
                <data android:pathPrefix="/applink"/>
            </intent-filter>
    

    这会问什么应用应该打开这个链接http://myappstoreuri/applink

    但如果你需要直接链接,你可以写类似

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

    那么每个以 myappstore:// 开头的链接都会启动您的应用

    【讨论】:

      猜你喜欢
      • 2011-03-15
      • 1970-01-01
      • 1970-01-01
      • 2017-02-17
      • 1970-01-01
      • 2020-07-16
      • 2014-07-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多