私は追加しようとしていますBranch.ioディープリンクを私のアプリケーションに追加しています。アプリケーション内で生成するリンクは、アプリケーションを起動する代わりにウェブサイトにリダイレクトされます。その後、手動でアプリを開くと、アクティビティに移動して、Deep Link経由で開くことに気付きました。 Fabricキットを使用してBranch.ioを追加し、Fabricのステップバイステップチュートリアルに従って、ディープリンクルーティングについて説明しました。私のアプリはGoogle Playストアにまだありません。Branch Deep Linkはアプリケーションを開けません
ウェブサイト上の私の設定(ダッシュボードの上部にあるAlways try to open app
とTest
のオプションもチェックしました)。私はBranchSDK:
応答/要求
のAndroidManifest.xml
<application
android:name=".app.MainApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<meta-data
android:name="io.branch.sdk.TestMode"
android:value="true" />
<meta-data
android:name="io.branch.sdk.BranchKey"
android:value="key_live_xxx" />
<meta-data
android:name="io.branch.sdk.BranchKey.test"
android:value="key_test_xxx" />
<activity
android:name=".ui.main.MainActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<data
android:host="open"
android:scheme="example" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
Build.gradle
//...
applicationId "com.example"
//...
compile('io.branch.sdk.android:library:[email protected]') {
transitive = true;
}
MainApplication
でtest key
を参照してくださいので、私は生成していますリンクは、あまりにもテストする必要があります
@Override
public void onCreate(){
super.onCreate();
Fabric.with(this);
Branch.getAutoInstance(this);
}
必要に応じてコードスニペットを追加できます。
私は、生成されたリンクの 'https'を' http'に変更して動作を開始しました。 – JakeT
良い点。私は 'スキーム'フィールドに何を書くべきか分からなかった。マニュアルで 'example'という言葉を削除し、' http:// your.example.scheme/for.links'のような明確な文字列を置くことをお勧めします。なぜなら、人々は混乱し、そこに何を書き込むべきか分からないからです。ありがとう! – voghDev