Reputation: 139
I am able to generate the long link but no luck with creating a short link. onComplete event doesn't get fired at all.
DynamicLink dynamicLink = FirebaseDynamicLinks.getInstance().createDynamicLink()
.setLink(Uri.parse(link))
.setDynamicLinkDomain("richdad.page.link")
.setAndroidParameters(new DynamicLink.AndroidParameters.Builder("in.geekunit.richdad").build())
.buildDynamicLink();
General.Show(MainActivity.this, "Long link " + dynamicLink.getUri().toString());
FirebaseDynamicLinks.getInstance().createDynamicLink()
.setLongLink(dynamicLink.getUri())
.buildShortDynamicLink().addOnCompleteListener(this, new OnCompleteListener<ShortDynamicLink>() {
@Override
public void onComplete(@NonNull Task<ShortDynamicLink> task)
{
General.Show(MainActivity.this, "onComplete");
if (task.isSuccessful())
{
mInvitationUrl = task.getResult().getShortLink();
General.Show(MainActivity.this, mInvitationUrl.toString());
}
else
{
General.Show(MainActivity.this, "Error");
}
}
});
Tried with generating short link directly as well, I see the same issue.
This is working fine on 2 devices I tried out of 4.
Upvotes: 1
Views: 120
Reputation: 26
there is an issue with FDL aSDK 16.1.0 & old PlayService. I suggest: - create short link from long link. - or, wait for a newer FDL aSDK (containing the fix).
Working on some devices suggest those devices have differing PlayService version.
Hope this helps.
Upvotes: 1