私のアプリでいくつかのコンテンツを共有するための動的リンクを作った。Firebaseのダイナミックリンクが特定の状況で私のアプリを起動しない
Androidデバイスのhref
タグを使用してHTMLページのリンクをクリックすると、リンクが機能しています。
これは、アプリがインストールされていない場合は、Playストアにアクセスし、アプリを開くとディープリンクアドレスを受け取ることができることを意味します。
しかし、リンクがFacebookのメッセンジャーや電子メールなどの他の場所でも正確に同じ場合、私はリンクをクリックしても動作しません。
アプリが既にインストールされていても、常にPlayストアにリダイレクトされます。
問題が何ですか?
私のコードはこちらです。
<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="mycode.app.goo.gl/"
android:scheme="https"
android:pathPattern=".*" />
</intent-filter>
ダイナミックリンク
https://mycode.app.goo.gl/?link=web page address
&ら= my custom scheme for sharing
& APN = my android app's package name
のAndroidManifest.xmlにおける活性の
GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this, this)
.addApi(AppInvite.API)
.build();
boolean autoLaunchDeepLink = false;
AppInvite.AppInviteApi.getInvitation(mGoogleApiClient, this, autoLaunchDeepLink)
.setResultCallback(
new ResultCallback<AppInviteInvitationResult>() {
@Override
public void onResult(@NonNull AppInviteInvitationResult result) {
if (result.getStatus().isSuccess()) {
// Extract deep link from Intent
Intent intent = result.getInvitationIntent();
String deepLink = AppInviteReferral.getDeepLink(intent);
Log.e("sf", "### deep link : " + deepLink);
} else {
Log.d("asdf", "getInvitation: no deep link found.");
}
}
});
意図部ディープリンクを受信するための
の.java
あなたは、あなたが使用しているコードを投稿してくださいすることができます:アプリでの取り扱いディープリンクが動作しているので、これは無関係ですが、適切にこれは私たちのマニフェストインテントフィルタでありますインストールされていない場合は、Playストアにアクセスし、アプリを開くとディープリンクアドレスを受け取ることができます。 – Nainal
私は自分のコードの一部をアップロードしました。 – hshan
Firebaseのサポートに連絡しました。彼らはFacebook Messengerで問題を再現でき、現在調査中です。私は何か新しいことを学ぶなら、このスレッドに書きます。 –