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(InstallReferrerSource) 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.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this source can answer at all on the current device.voidrequestReferrer(InstallReferrerCallback callback) Asks for the install referrer.
-
Method Details
-
isSupported
boolean isSupported()Whether this source can answer at all on the current device.
Returns
true when a store client is present
-
requestReferrer
Asks for the install referrer. The answer arrives on the callback, possibly asynchronously and possibly on another thread;
Invitesmarshals it back onto the EDT.Parameters
callback: receives the answer, never null
-