简体   繁体   English

unity android 深层链接不起作用

[英]unity android deep linking not working

Im developing a mobile app using unity and I want to deep link the mobile app to the website.我使用 unity 开发了一个移动应用程序,我想将移动应用程序深度链接到网站。 I have edited the androidmanifest as shown in the developers site but even though the building process runs smoothly when i try to type the link on the browser and launch the app it does not work我已经编辑了开发人员网站中显示的 androidmanifest,但是即使当我尝试在浏览器上键入链接并启动应用程序时构建过程运行顺利,它也不起作用

<activity android:name="com.liveroom.liveroom.GalleryUpdater"
                  android:label="@string/app_name">
            <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:scheme="liveroom"
               android:host="liveview"/>
            </intent-filter>
            <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
            <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
        </activity>

as stated in the developers article the intent should be able to access and load the app when the uri liveroom://liveview but itt does not do so.开发人员文章中所述,当 uri liveroom://liveview 但它不这样做时,意图应该能够访问和加载应用程序。 please point my mistake, thank you请指出我的错误,谢谢

When you type on browser it will not open .当您在浏览器上输入时,它不会打开。 to test make an html file using < a href tag then it will open.测试使用 < a href 标签制作一个 html 文件,然后它将打开。

不是每个浏览器都支持深度链接,只有少数浏览器支持深度链接,比如如果你想检查深度链接,使用谷歌浏览器最新更新的浏览器,所以当你使用二维码测试​​深度链接时,它会打开特定的应用程序。

Was also not working for me.也不适合我。 What helped was to remove android:host="(...)"有帮助的是删除android:host="(...)"

So my AndroidManifest.xml now looks like this:所以我的 AndroidManifest.xml 现在看起来像这样:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
  <application>
    <activity android:name="com.unity3d.player.UnityPlayerActivity" android:theme="@style/UnityThemeSelector" >
      <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:scheme="unitydl" />
      </intent-filter>
    </activity>
  </application>
</manifest>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM