0

I am new to firebase and I wanted to know if it is possible to limit the number of invites that a user can send. I am looking to have something like:

private void onInviteClicked() {

    Intent intent = new AppInviteInvitation.IntentBuilder("An Invitation")
            .setMessage(You have been invited")
            .setNumberOfInvites(4)  //where this only allows the user to invite four people.
                                      This is just an example and firebase doesn't have this 

            .build();
    startActivityForResult(intent, REQUEST_INVITE);
}

When the method "onInvitedCliked()" is called, it brings up this invitation window where the user can select as many recipients from their contact list. What i want is to only allow the user to only add one recipient under "Add Recipients".

Invitation Window

Nah Prime
  • 33
  • 1
  • 9
  • Since you already know Firebase doesn't offer this as a feature, what are you looking for in an answer? – Frank van Puffelen Jan 20 '19 at 23:39
  • maybe a different way of implementing that. maybe a way to control the number of recipients that the user can click on from the contact list...@FrankvanPuffelen – Nah Prime Jan 21 '19 at 00:03
  • The question is a bit unclear as @FrankvanPuffelen mentioned. Are you looking for some kind of Firebase feature or are you asking how to increment a counter that's stored in Firebase that keeps track of how many invites a user has sent? So then, when they send another, it the app can compare to what's stored and disallow more than X invites? – Jay Jan 21 '19 at 18:12
  • I added more information and an image to my original question if that helps @Jay – Nah Prime Jan 21 '19 at 19:10
  • That question has nothing to do with Firebase. The coding in your App determines how many users you can select; e.g. you can code your app to only allow a single selection, two selections or more but that's how the code in your app handles clicks/taps and unrelated to firebase. – Jay Jan 21 '19 at 19:50
  • @Jay I didn't code that window. I think that window comes with importing "AppInviteInvitation". Here is the link i got the method from https://firebase.google.com/docs/invites/android – Nah Prime Jan 21 '19 at 20:12
  • If you are using a 'canned' solution provided by Firebase then it only provides the functionality they built into it, which is why I asked if you were looking for that feature within Firebase or if you were crafting your own solution with a custom sharing sheet. – Jay Jan 21 '19 at 21:08

0 Answers0