UnityでandroidManifest.xmlにaction:VIEWのintent-filterを追加し、Androidのブラウザー(Chrome)から起動したいと思い、<a>で以下のようにIntentリンクを配置し、リンクをタップしたのですがPlayストアが起動し「アイテムは見つかりませんでした。」と表示されてしまいます。
Build And Runでインストールしたアプリだとインテント起動できないのでしょうか?
それとも何か設定が必要なのでしょうか?
(ちなみに、Chromeで表示するindex.htmlはGithub Pagesで試しています)
androidManifest.xml
xml
1<?xml version="1.0" encoding="utf-8"?> 2<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="hoge.intent.test" xmlns:tools="http://schemas.android.com/tools" android:installLocation="preferExternal"> 3 <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" /> 4 <application android:theme="@style/UnityThemeSelector" android:icon="@mipmap/app_icon" android:label="@string/app_name" android:isGame="true" android:banner="@drawable/app_banner"> 5 <activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name" android:screenOrientation="fullSensor" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:hardwareAccelerated="false"> 6 <intent-filter> 7 <action android:name="android.intent.action.MAIN" /> 8 <category android:name="android.intent.category.LAUNCHER" /> 9 <category android:name="android.intent.category.LEANBACK_LAUNCHER" /> 10 </intent-filter> 11 <meta-data android:name="unityplayer.UnityActivity" android:value="true" /> 12 <intent-filter> 13 <action android:name="android.intent.action.VIEW" /> 14 <category android:name="android.intent.category.DEFAULT" /> 15 <category android:name="android.intent.category.BROWSABLE" /> 16 <data android:scheme="hoge" android:host="fuga" /> 17 </intent-filter> 18 </activity> 19 <meta-data android:name="unity.build-id" android:value="fd1165c4-3fd9-4121-b754-9f2be8584b29" /> 20 <meta-data android:name="unity.splash-mode" android:value="0" /> 21 <meta-data android:name="unity.splash-enable" android:value="True" /> 22 <meta-data android:name="android.max_aspect" android:value="2.1" /> 23 </application> 24 <uses-feature android:glEsVersion="0x00020000" /> 25 <uses-feature android:name="android.hardware.touchscreen" android:required="false" /> 26 <uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" /> 27 <uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" /> 28</manifest>
index.html
html
1<a href="intent://fuga#Intent;package=hoge.intent.test;action=VIEW;category=hoge.intent.test;scheme=hoge;end"> hoge </a>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/02/22 12:47