public interface InviteListener

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

Register with Invites.setInviteListener 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) {
    }
});

Methods

public abstract void inviteReceived(InviteAttribution attribution)Called when this install is attributed to an invite.
public abstract void attributionUnavailable(String reason)Called when no invite will be attributed to this install.

Method details

inviteReceived

public abstract void inviteReceived(InviteAttribution attribution)
Called when this install is attributed to an invite.

Parameters

attribution InviteAttribution
the resolved attribution, never null

attributionUnavailable

public abstract 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 String
one of the REASON_ constants on Invites