Interface InviteListener


public interface InviteListener

Receives the invite that caused this install, if there was one.

Register with Invites.setInviteListener(InviteListener) before calling Invites.checkForInvite(). Exactly one of the two methods is called per install, on the EDT, and neither is called again on later launches -- the answer is remembered.

Invites.setInviteListener(new InviteListener() {
    public void inviteReceived(InviteAttribution attribution) {
        Dialog.show("Welcome", "Invited by " + attribution.getCampaign(), "OK", null);
    }

    public void attributionUnavailable(String reason) {
    }
});
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when no invite will be attributed to this install.
    void
    Called when this install is attributed to an invite.
  • Method Details

    • inviteReceived

      void inviteReceived(InviteAttribution attribution)

      Called when this install is attributed to an invite.

      Parameters
      • attribution: the resolved attribution, never null
    • attributionUnavailable

      void attributionUnavailable(String reason)

      Called when no invite will be attributed to this install. This is the ordinary outcome -- most installs are not invited -- so treat it as information rather than as a failure.

      Parameters
      • reason: one of the REASON_ constants on Invites