代码之家  ›  专栏  ›  技术社区  ›  kokoko

Applenks无法在android上运行

  •  1
  • kokoko  · 技术社区  · 8 年前

    我有一个Android应用程序,可以打开从web浏览器点击的应用程序上的链接。

    我有以下意图过滤器:

     <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
    
            </intent-filter>
    
            <intent-filter android:autoVerify="true">
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <action android:name="android.intent.action.VIEW" />
    
    
                <data android:scheme="http" android:host="www.mysite.com" />
                <data android:scheme="https" android:host="www.mysite.com" />
            </intent-filter>
    

    此外,我还检查了mysite/.knownerd/assetlinks.json中的assetjson文件中我签名的sha256密钥、包名等。一切看起来都很正确。但当我点击网站上的链接时,应用程序仍然没有打开。

    1 回复  |  直到 8 年前
        1
  •  1
  •   Simon Marquis    8 年前
    <activity android:name=".YourActivity">
    
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    
        <intent-filter android:autoVerify="true">
            <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" />
            <data android:scheme="http" />
            <data android:host="mysite.com" />
        </intent-filter>
    
    </activity>