public interface InstallReferrerSource

Reads the referrer the application store recorded when this application was installed. This is the deterministic half of invite attribution: the invite code makes the whole round trip through the store, so no matching or guessing is involved.

The Codename One build supplies the implementation on platforms that have one and registers it through Invites.registerInstallReferrerSource before the application starts. Where none is registered – the simulator, the desktop build, iOS, and any Android device without store services – Invites behaves exactly as it does on a device that reports no referrer.

An application does not implement this interface.

Methods

public abstract boolean isSupported()Whether this source can answer at all on the current device.
public abstract void requestReferrer(InstallReferrerCallback callback)Asks for the install referrer.

Method details

isSupported

public abstract boolean isSupported()
Whether this source can answer at all on the current device.

Returns

true when a store client is present

requestReferrer

public abstract void requestReferrer(InstallReferrerCallback callback)
Asks for the install referrer. The answer arrives on the callback, possibly asynchronously and possibly on another thread; Invites marshals it back onto the EDT.

Parameters

callback InstallReferrerCallback
receives the answer, never null