#StackBounty: #android #firebase #firebase-dynamic-links Firebase dynamic link request contains an invalid argument

Bounty: 250

Am trying to build a dynamic url, using Firebase dynamic links but i get a exception.

private void sendNativeInvites(){

        String email = UserUtils.getCurrentUser(this).getEmail();
        String link = "https://play.google.com/store/apps/details?id=com.mindedges.beephourly?invitedby=" + email;

        FirebaseDynamicLinks.getInstance().createDynamicLink()
                .setLink(Uri.parse(link))
                .setDomainUriPrefix("https://c6yge.app.goo.gl")
                .setAndroidParameters(
                        new DynamicLink.AndroidParameters.Builder("com.example.android")
                                .setMinimumVersion(125)
                                .build())
                .buildShortDynamicLink()
                .addOnSuccessListener(new OnSuccessListener<ShortDynamicLink>() {
                    @Override
                    public void onSuccess(ShortDynamicLink shortDynamicLink) {
                        Log.e(TAG, "Successfully built build dynamic link");
                        Uri invitationUrl = shortDynamicLink.getShortLink();
                        doSendInvite(invitationUrl);
                    }
                }).addOnFailureListener(new OnFailureListener() {
                    @Override
                    public void onFailure(@NonNull Exception e) {
                        Log.e(TAG, "failed to build dynamic link", e);
                    }
                });
    }



failed to build dynamic link
    com.google.android.gms.common.api.ApiException: 400: Request contains an invalid argument.
        at com.google.android.gms.common.api.internal.TaskUtil.setResultOrApiException(Unknown Source:12)
        at com.google.firebase.dynamiclinks.internal.zzi.zza(Unknown Source:4)
        at com.google.firebase.dynamiclinks.internal.zzn.dispatchTransaction(Unknown Source:10)
        at com.google.android.gms.internal.firebase_dynamic_links.zzb.onTransact(Unknown Source:12)
        at android.os.Binder.execTransact(Binder.java:697)

Am not getting what wrong param am passing. I own the domain “https://c6yge.app.goo.gl” as per firebase console.


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.