Firebase Invitations Error - Link Broken

I am trying to run Firebase prompts. I followed the instructions here .

The code that starts the invitation process is as follows

        AppInviteInvitation.IntentBuilder intentBuilder = new AppInviteInvitation.IntentBuilder(LanguageManager.getString("title-Invitation"))
                .setMessage(LanguageManager.formatString("message-INVITATION_{game-name}", ScribbleGame.getGame().getDisplayName()))
                .setEmailSubject(LanguageManager.formatString("title-TRY_{game_name}", ScribbleGame.getGame().getDisplayName()))
                .setEmailHtmlContent(emailHtml);

        application.startActivityForResult(intentBuilder.build(), ActivityResultConstants.REQUEST_INVITE);

The email contains a link into which the tag is inserted %%APPINVITE_LINK_PLACEHOLDER%%. Invitations are sent as expected.

I tried both with deep links and without them. Without deep links, I get a URL that doesn't work and returns a 404 error.

https://plus.google.com/appinvite/131189621476-3ec41294-23ea-47e7-81d7-9a5fd004de6e

With deep links, I get a URL that doesn't work and returns a 500 error.

https://sfqj5.app.goo.gl/i/131189621476-b6d8a1cf-81b4-4318-90d0-c32ee1a945e1

I did a lot, but could not establish why the links did not work.

+7
3

404 AppInviteInvitation.IntentBuilder.setDeepLink() , AppInviteInvitation.IntentBuilder.setDeepLink().

, , https://firebase.google.com/docs/invites/android

play-services-appinvite, Firebase URI Deeplink Firebase. 1, 2 3 " ", .

+1

. , firebase.

- , imgur

0

Put setDeepLink()in Intent Builder. This solved my mistake.

val intent = AppInviteInvitation.IntentBuilder(getString(R.string.invite_friends_title))
                                .setMessage(getString(R.string.invite_friends_message))
                                .setDeepLink(Uri.parse("https://"))
                                .setOtherPlatformsTargetApplication(
                                        AppInviteInvitation.IntentBuilder.PlatformMode.PROJECT_PLATFORM_IOS,
                                        "311303977939-11h8u454au9q1ts1mleiat83v2r2cd5n.apps.googleusercontent.com")
                                .build()
0
source

Source: https://habr.com/ru/post/1017309/


All Articles