标签: deep-linking

如何在网站中进行深层链接

<a class="grey-text text-lighten-3" target="_blank" href="javascript:void(0);" onclick="document.write(yourOS())">Instagram</a>



function yourOS() {
var ua = navigator.platform.toLowerCase();
if (ua.indexOf("android") != -1) {
    document.write(.link("instagram://user?username=owendunnigan"));
} else {
    .link("http://www.instagram.com/OwenDunnigan");
}
}
Run Code Online (Sandbox Code Playgroud)

我正在尝试将应用程序深层链接到我的网站,但我不知道如何让它转到计算机上的常规旧 Instagram,然后转到 Android 或 iOS 设备上的应用程序。我知道这些链接有效,因为我单独尝试过它们。

html javascript android deep-linking

2
推荐指数
1
解决办法
3万
查看次数

Android 意图过滤器删除查询字符串

intent-filter我在我的节点中定义了一个数据标签,AndroidManifest.xml如下所示:

<data
    android:scheme="http"
    android:host="example.com"
    android:pathPrefix="/path/pageEnum" />
Run Code Online (Sandbox Code Playgroud)

我想要捕捉的路径是http://example.com/path/pageEnum?one=1&two=2&three=3

adb我正在这样启动意图:

adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "http://example.com/path/pageEnum?one=1&two=2&three=3"

目标活动已成功启动,但是当我调用getIntent().getDataString()字符串onCreate()值时http://example.com/path/pageEnum?one=1

除第一个查询参数之外的所有查询参数都将被删除。

是否有任何解决方法可以确保我获得所有查询参数?

谷歌的文档中没有任何关于此行为的内容。

android deep-linking android-intent

2
推荐指数
1
解决办法
1310
查看次数

分支 IO 深度链接参数未出现在 React Native 中

我已经在我的反应本机应用程序中实现了分支。平台中的所有链接均已设置,我在 URL 中看到了我需要的参数。我遇到的问题是当应用程序首次安装时该值为空。只有在我安装后,然后返回到它识别此参数的链接。这是预期的行为吗?

我如何在初始加载组件中设置分支调用。我将其添加到 componentDidMount() 中,因为我正在使用 redux 并且想要提醒 redux 该值。

componentDidMount(){
    branch.subscribe(({params, uri, error}) => {
      if (params && !error) {

        if(params.coid != null){

          const id = params.coid
          this.showAlertMessage(
            'BUNDLE COMPANY ID',
            id
          )
          this.props.CheckAdmin(id)
          LocalStore.get('localID').then(localID => {
            LocalStore.save('localID', {value: id});
          })
        }
      }else{

        this.showAlertMessage(
          'BUNDLE COMPANY ID',
          "BUNDLE COID IS NULL"
        )
        this.props.IsMasterDownload()
      }
      this.showAlertMessage(
        'BRANCH URI',
        uri
      )
    })

  }
Run Code Online (Sandbox Code Playgroud)

Branch.subscribe 是否需要位于我的组件类之外才能正常运行?

javascript android deep-linking react-native branch.io

2
推荐指数
1
解决办法
3114
查看次数

Firebase 动态链接 - 如何在链接内发送附加数据?

我想使用 Firebase 动态链接创建深层链接。

我已阅读文档,为了使用 REST API 创建深层链接,需要使用 JSON 对象创建 HTTP POST 请求,如下所示:

{"dynamicLinkInfo": 
{
"dynamicLinkDomain": "abc123.app.goo.gl",
"link": "https://example.com/",
"androidInfo": {
  "androidPackageName": "com.example.android"
},
"iosInfo": {
  "iosBundleId": "com.example.ios"
}
}
Run Code Online (Sandbox Code Playgroud)

我的问题是 - 我想在链接内向应用程序发送附加数据。我该怎么做?谢谢!

deep-linking firebase firebase-dynamic-links

2
推荐指数
1
解决办法
3902
查看次数

如何修复未将应用程序图标显示到应用程序抽屉中?

在我的应用程序中,我想使用deeplink。当添加intent-filter深层链接启动activity不见了应用程序图标到应用程序抽屉里
但是当删除深层链接 时,将intent-filter应用程序图标显示到应用程序抽屉中

清单代码:

<activity android:name=".Pages.Splash.SplashPage">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
        <!-- DeepLink -->
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data
            android:host="www.example.com"
            android:pathPrefix="/gaming"
            android:scheme="http" />
        <data
            android:host="example.com"
            android:pathPrefix="/gaming"
            android:scheme="http" />

    </intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud)

使用以上代码时,不在应用程序抽屉中显示应用程序图标,而是从manifest显示图标中删除以下代码时。

        <!-- DeepLink -->
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data
            android:host="www.example.com"
            android:pathPrefix="/gaming"
            android:scheme="http" />
        <data
            android:host="example.com"
            android:pathPrefix="/gaming" …
Run Code Online (Sandbox Code Playgroud)

java android deep-linking android-deep-link

2
推荐指数
1
解决办法
448
查看次数

使用 Intent 的 Android 深层链接不打开应用

我正在尝试打开我用移动 Chrome 浏览器制作的应用程序。

https://developer.chrome.com/multidevice/android/intents

从这个链接,我想我必须使用“意图:”语法来完成这项工作。

但是,我的应用程序无法打开。相反,它会打开 Google Play 商店,但商店只显示“找不到项目”页面。

我很想知道我是否做错了什么。

        <intent-filter>
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.BROWSABLE" />
            <category android:name="android.intent.category.DEFAULT" />

            <data android:scheme="myscheme" android:host="myhost" android:path="/"/>
        </intent-filter>
Run Code Online (Sandbox Code Playgroud)

这是我写的意图过滤器。

var androidIntentUrl = 'intent://myhost/#Intent;scheme=myscheme;package=my.test.app.package;end';

if(!isIOS && isChromeAndBiggerThanVer25()) {
        location.href = androidIntentUrl;
}
Run Code Online (Sandbox Code Playgroud)

这是我在网上写的。

必须在 Play 商店发布应用才能实现这一目标吗?

我还不太明白全部内容。

我想知道怎么了。

PS)名称“myscheme”和“myhost”只是我为写这个问题而编造的名称。我的代码中的实际名称与我的项目设置中写入的名称以及所有名称相匹配,包括包名称。

android google-chrome deep-linking android-manifest android-intent

2
推荐指数
1
解决办法
3385
查看次数

如何获取Expo静态深层链接进行开发?

我需要一个用于开发的 Expo 静态深层链接,用于与 3rd 方 (Cognito) 进行 Oauth 重定向

我已经使用过,Linking.makeUrl()但这会返回一个带有动态本地 ipaddress exp://10.0.0.107:19000 的深层链接,这对于团队中的其他开发人员来说是不一致的。

文档位于:https : //docs.expo.io/versions/latest/workflow/linking/#linking-module

说各种环境链接看起来像

  • 在世博客户端发布的应用程序exp://exp.host/@community/with-webbrowser-redirect

  • 独立发布的应用程序myapp://

  • 发展exp://wg-qka.community.app.exp.direct:80

我已经尝试过该开发链接,但无法打开。

deep-linking amazon-cognito react-native expo

2
推荐指数
1
解决办法
2999
查看次数

深层链接在 Android 中不再起作用

我在 Android Studio 中启动了一个新项目并将其添加到我的androidmanifest.xml

    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

        <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:host="www.example.com"
                android:pathPrefix="/gizmos"
                android:scheme="http"/>
        </intent-filter>
    </activity>
Run Code Online (Sandbox Code Playgroud)

然后我转到 Google Chrome 并输入:http://www.example.com/gizmos。该应用程序打不开。然后尝试命令行:

mac-van-jim:DeeplinkTest jimclermonts$ adb shell am start -n eu.theappfactory.deeplinktest/MainActivity
Starting: Intent { cmp=eu.theappfactory.deeplinktest/MainActivity }
Error type 3
Error: Activity class {eu.theappfactory.deeplinktest/MainActivity} does not exist.
Run Code Online (Sandbox Code Playgroud)

和这个:

mac-van-jim:DeeplinkTest jimclermonts$ adb shell am start -W -a android.intent.action.VIEW -d "http://www.example.com" eu.theappfactory
Starting: Intent { act=android.intent.action.VIEW dat=http://www.example.com/... pkg=eu.theappfactory }
Error: Activity …
Run Code Online (Sandbox Code Playgroud)

android uri deep-linking

2
推荐指数
1
解决办法
6285
查看次数

android deeplinking - 第一个路径前缀是动态的,但第二个不是

我有一个网址,例如https://www.mobilePhoneSystem.com/{user}/registerDate/{date}。所以{user}路径前缀是动态的。我只需要处理包含registerDate. 我在清单中写了这样的内容

<!-- Deep linking-->
        <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="https"
                android:host="/www.mobilePhoneSystem.com"
                android:pathPrefix="/registerDate" />

        </intent-filter>
    </activity>
Run Code Online (Sandbox Code Playgroud)

但它不会触发。当我在 mainfest 中添加任何用户时,例如pathPrefix=/user111/registerDate,它会触发并正常工作。但用户是动态的。那么我该如何处理这种类型的深层链接呢?

android manifest deep-linking intentfilter

2
推荐指数
1
解决办法
2876
查看次数

如何在 AndroidManifest.xml 中注入主机和架构以进行 Android 深度链接

我正在尝试使用 build.gradle 将 url 架构和路径动态注入到我的 AndroidManifest.xml 文件中作为参考

但是,这不允许触发深度链接。

当我在 AndroidManifest.xml 中使用静态值时,我测试了深度链接的工作情况。

            // AndroidManifest.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="${appScheme}"
                android:host="${hostName}"
                android:path="/path2" />

            <data
                android:scheme="${appScheme}"
                android:host="${hostName}"
                android:path="/path1" />
        </intent-filter>




// build.gradle (:app)
defaulConfig {
        manifestPlaceholders = [
        hostName: "www.host_name.com",
        appScheme: "https"
    ]
}


  demo {
        resValue "string", "hostName", "www.host_demo.com"
        resValue "string", "appScheme", "https"
    }

    staging {
        resValue "string", "hostName", "www.host_staging.com"
        resValue "string", "appScheme", "http"
    }
Run Code Online (Sandbox Code Playgroud)

android deep-linking android-manifest

2
推荐指数
1
解决办法
2765
查看次数