You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is present if app was not running in the background when an app link was clicked on and caused the app to be launched. In this case repeated calls to onDynamicLink() resolves to the same app link. Firebase Dynamic Links documentation states that dynamic link should be returned only once and then cleared. So this behaviour is inconsistent with the documentation and breaks the flow of an app. To make things even worse each call to onDynamicLink() returns link data with a different clicked timestamp so we have no way to track which links have already been processed on application level either.
The issue is not present on cases where an app link was clicked while application was still running in the background (not killed). In those cases only the first call to onDynamicLink() resolves with the link while subsequent ones do not.
Internally, it may look like its an issue with FirebaseDynamicLinks.getInstance().getDynamicLink(intent) since documentation states that:
Calling getDynamicLink() retrieves the link and clears that data so it is only processed once by your app.
However calling this method repeatedly still resolves with the link data, so data is not cleared as it should be.
We found that a temp patch for this would be to clear intent data at plugin level, at least until FB function does it, by calling intent.setData(null) in:
private void respondWithDynamicLink(Intent intent) {
this.firebaseDynamicLinks.getDynamicLink(intent)
.continueWith(new Continuation<PendingDynamicLinkData, JSONObject>() {
@Override
public JSONObject then(Task<PendingDynamicLinkData> task) throws JSONException {
intent.setData(null); // We clear clear intent data since getDynamicLink() did not.
PendingDynamicLinkData data = task.getResult();
JSONObject result = new JSONObject();
result.put("deepLink", data.getLink());
result.put("clickTimestamp", data.getClickTimestamp());
result.put("minimumAppVersion", data.getMinimumAppVersion());
if (dynamicLinkCallback != null) {
PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, result);
pluginResult.setKeepCallback(true);
dynamicLinkCallback.sendPluginResult(pluginResult);
}
return result;
}
});
}
The text was updated successfully, but these errors were encountered:
The issue is present if app was not running in the background when an app link was clicked on and caused the app to be launched. In this case repeated calls to
onDynamicLink()
resolves to the same app link. Firebase Dynamic Links documentation states that dynamic link should be returned only once and then cleared. So this behaviour is inconsistent with the documentation and breaks the flow of an app. To make things even worse each call toonDynamicLink()
returns link data with a different clicked timestamp so we have no way to track which links have already been processed on application level either.The issue is not present on cases where an app link was clicked while application was still running in the background (not killed). In those cases only the first call to
onDynamicLink()
resolves with the link while subsequent ones do not.Internally, it may look like its an issue with
FirebaseDynamicLinks.getInstance().getDynamicLink(intent)
since documentation states that:However calling this method repeatedly still resolves with the link data, so data is not cleared as it should be.
We found that a temp patch for this would be to clear intent data at plugin level, at least until FB function does it, by calling
intent.setData(null)
in:The text was updated successfully, but these errors were encountered: