Firebase Dynamicsのリンクを使用しました。私のアプリを開いたり、ゲームストアに行ったり、URLに行ったりできます。しかし、私はリンクを介していくつかのパラメータを渡すとき、私は最初のパラメータを取得することができます。 は、ここに私のダイナミックリンクです:Firebase Dynamic links経由で複数のパラメータを渡すAndroid
https://xx.app.goo.gl/?link=http://xx.com/?usn=abc&pass=def&apn=com.xx&afl=http://google.com
そして私は、リンク取得するには、このコードを使用:(パスを= DEF失われた) 誰もがこの問題を解決http://xx.com/?usn=abc:
// Build GoogleApiClient with AppInvite API for receiving deep links
mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this, this)
.addApi(AppInvite.API)
.build();
// Check if this app was launched from a deep link. Setting autoLaunchDeepLink to true
// would automatically launch the deep link if one is found.
boolean autoLaunchDeepLink = false;
AppInvite.AppInviteApi.getInvitation(mGoogleApiClient, this, autoLaunchDeepLink)
.setResultCallback(
result -> {
if (result.getStatus().isSuccess()) {
// Extract deep link from Intent
Intent intent = result.getInvitationIntent();
String deepLink = AppInviteReferral.getDeepLink(intent);
Logger.e(deepLink);
}
}
);
とログの印刷を?
ありがとう、私はそれをチェックします。 usn/passはテスト目的のためのものです:D – maphongba008
それは動作します、多くのありがとう。 – maphongba008
この類似の質問でも助けてください:http://stackoverflow.com/q/42119692/6144372 –