Android深度链接不工作错误\未知\ URL\方案

Android深度链接不工作错误\未知\ URL\方案,android,deep-linking,android-deep-link,Android,Deep Linking,Android Deep Link,我已经使用(我认为)文档中的格式在清单中放置了一个深层链接 <activity android:name="my.package.name.AInviteFriends" android:label="@string/title_activity_a_invite_friends" android:launchMode="singleTask" android:theme="@style/Ap

我已经使用(我认为)文档中的格式在清单中放置了一个深层链接

 <activity
            android:name="my.package.name.AInviteFriends"
            android:label="@string/title_activity_a_invite_friends"
            android:launchMode="singleTask"
            android:theme="@style/AppTheme.NoActionBar">

            <intent-filter android:label="@string/filter_view_invite_friends">
                <action android:name="android.intent.action.VIEW" />

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

                <data
                    android:scheme="my.package.name" /custom scheme I was told to use
                    android:host="companyurl.com"
                    android:pathPrefix="/invite_friends"
                     />

            </intent-filter>


</activity>

然后,我从应用程序中导航到这个URL,希望它被拦截并进入活动。我不知道为什么我们使用深度链接而不是普通的目的,我认为这是为了跟踪或其他什么:

我的包裹。name://company.com/invite_friends


但当我尝试此操作时,浏览器会打开一个网页不可用/ERR\u UNKNOWN\u URL\u SCHEME错误。关于这个意图,我遗漏了什么?

我不确定您是否可以使用“类似地址”的方案。 我将从一个简单的方案开始,例如“mygreatapp”(URI是mygreatapp://),并且没有主机或路径前缀。
看看它是如何为您工作的,然后从那里开始

您不能使用。在scheme中,请参阅@LiazKamperThank编写的答案感谢您的回复。只需使用android:scheme=“http”和URL http://company.com/invite_friends,它就会进入我公司的404页面,未被拦截。很抱歉,响应太晚。当你只是“尝试”时会发生什么```