0

誰かが Facebook からhttp://myappAdurl.comを共有した場合、別のリンクをクリックした場合よりも、そのデバイスにアプリケーションが存在する場合、アプリを開く必要があります。次の行をマニフェストに追加しましたが、結果を取得できず、動作しませんでした。

<application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        <activity
            android:name=".TinyUrlTest"
            android:label="@string/title_activity_tiny_url_test"
            android:launchMode="singleTask" >
            <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:host="www.myappAdurl.com"
                    android:path="/images"
                    android:scheme="http" />
            </intent-filter>
            <intent-filter>
                <action android:name="www.myappAdurl.com" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
            </intent-filter>
        </activity>
    </application>

以下のプロジェクトも試しましたが、com.commonsware.android.MY_ACTION https://github.com/commonsguy/cw-advandroid/tree/master/Introspection/URLHandlerなどのリンクが開きます

4

1 に答える 1

0

わかりました、私が与えるなら、それを見つけました

 android:pathPattern="/*.*"

データ要素内で、すべてを開きます

于 2012-09-10T00:31:10.807 に答える