简体   繁体   中英

Using Android/Firebase Invite System

I have implemented AppInviteInvitation today with Android and can succesfully send an invite but when the recipient tries to press the install button within the invite they are taken to plus.google.com in their device browser.

Am I doing something wrong?

  private void onInviteClicked() {
    Intent intent = new AppInviteInvitation.IntentBuilder("Invite")
            .setMessage("Download")
            .setCallToActionText("Install")
            .build();
   final int REQUEST_INVITE = 0;
    startActivityForResult(intent, REQUEST_INVITE);
 }

Try setting the deep link property to your app name.

.setDeepLink(Uri.parse(getString(R.string.app_name)))

I was getting a 404 error on the Google Plus link until I added the above statement to the Intent builder. After adding the statement, the invites behaved as expected. I am not using deep links in my application, though they are enabled for the app via the Google Play console.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM