In my application, many link handled in same Activity,
So, I need to know what link when link received.
I know that I will recognize after success listener,
FirebaseDynamicLinks.getInstance()
.getDynamicLink(intent)
.addOnSuccessListener(activity, new OnSuccessListener<PendingDynamicLinkData>() {
@Override
public void onSuccess(PendingDynamicLinkData pendingDynamicLinkData) {
if (pendingDynamicLinkData != null) {
Uri deepLink = pendingDynamicLinkData.getLink();
but, My app's UI thread have to know before success listener, because of UI thread's next operations.
So, I handle intent like that,
if(intent.getExtras() != null
&& intent.getExtras().toString().contains("firebase")) { // this comes from firebase dynamic links.
Could I handle intent in this way? And, Firebase framework will aways put extra data include firebase string?
Could you please, let me know any other solution? The bast ways, I hope to know my apps' host "(app).goo.gl" before success callback..
You can check if intent extras contains special constant
getIntent().hasExtra("com.google.firebase.dynamiclinks.DYNAMIC_LINK_DATA")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With