Firebase Dynamics 링크를 사용했으며 내 앱을 열거 나 매장을 방문하거나 URL로 이동할 수 있습니다. 그러나 링크를 통해 매개 변수를 전달할 때 첫 번째 매개 변수 만 가져올 수 있습니다. 여기 내 동적 링크입니다 :Firebase Dynamic links를 통해 여러 매개 변수 전달 안드로이드
https://xx.app.goo.gl/?link=http://xx.com/?usn=abc&pass=def&apn=com.xx&afl=http://google.com
그리고 링크 얻기 위해이 코드를 사용 :
// 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);
}
}
);
그리고 로그 인쇄 : http://xx.com/?usn=abc (패스 데프 잃은 =) 사람은이 문제를 해결?
감사합니다. 확인하겠습니다. usn/pass는 테스트 목적으로 만 사용됩니다. D – maphongba008
작동합니다. 많은 감사드립니다. – maphongba008
이 비슷한 질문도 도와주세요 : http://stackoverflow.com/q/42119692/6144372 –