我使用了 Firebase Dynamics 链接,它可以打开我的应用程序、去玩商店或去一个 URL。但是当我通过链接传递一些参数时,我只能得到第一个参数。这是我的动态链接:
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 (pass=def 丢失) 有人解决这个问题吗?