其他分享
首页 > 其他分享> > Android深层链接 – 使用Branch.io链接未在Android中打开

Android深层链接 – 使用Branch.io链接未在Android中打开

作者:互联网

我正在使用websdk创建分支链接.
以下是来自websdk的链接属性:

var sampleParams = {
        tags: [ 'tag1', 'tag2' ],
        channel: 'sample app',
        feature: 'share',
        stage: 'created link',
        type: 1,
        data: {
            mydata: 'bar',
            job_public:'https://onblickqa1.azurewebsites.net/Job/JobDetails?jobId=586e7f0dc99b2c0caccdae7d',

            '$desktop_url': 'https://onblickqa1.azurewebsites.net/Job/JobDetails?jobId=586e7f0dc99b2c0caccdae7d',
            '$og_title': 'Branch Metrics',
            '$og_description': 'Branch Metrics',
            '$og_image_url': 'http://branch.io/img/logo_icon_white.png'
        }
    };

并使用上面生成的短网址,分支的网址就像https://nc6e.test-app.link/BUy4NMpRGz
现在我通过电子邮件分享这个链接.当我点击android中的上述链接时,app无法检测到此链接.它总是重定向到Playstore网址.

Android清单:

  <activity android:name=".activities.DeepLinkingActivity" android:launchMode="singleTop">
        <intent-filter>
            <data android:scheme="mvppdmo" android:host="open" />
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
        </intent-filter>
        <meta-data
            android:name="io.branch.sdk.auto_link_path"
            android:value="job_public" />
        <meta-data
            android:name="io.branch.sdk.auto_link_request_code"
            android:value="@integer/AutoDeeplinkRequestCode" />
    </activity>

分支仪表板设置为:

我查看过“我有一个Android应用”和“启用应用链接”
 Uri架构:mvppdmo://
 并给出了SHA1

注意:我在web和android中使用相同的分支测试密钥.

谁能告诉我这是什么问题?

Logcat报告:

  I/ActivityManager: START u0 {act=android.intent.action.VIEW    dat=https://nc6e.test-app.link/... flg=0x14002000    cmp=com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity (has extras)} from uid 10054 on display 0

  I/chromium: [INFO:CONSOLE(0)] "Mixed Content: The page at 'https://nc6e.test-app.link/nX2d5p9pIz?__branch_flow_type=chrome_deepview&__branch_flow_id=345908912462718295' was   loaded over HTTPS, but requested an insecure image   'http://branch.io/img/logo_icon_white.png'. This content should also be served over HTTPS.", source: https://nc6e.test-app.link/nX2d5p9pIz?__branch_flow_type=chrome_deepview&__branch_flow_id=345908912462718295 (0)

解决方法:

很高兴我能直接通过我们的支持渠道Chaitu帮助您.对于其他人来说,问题归结为Chaitu的链接指向与他试图推出的应用程序不同的包名.

标签:android,deep-linking,branch-io
来源: https://codeday.me/bug/20190701/1351554.html