Interface InstallReferrerSource


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(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 Type
    Method
    Description
    boolean
    Whether this source can answer at all on the current device.
    void
    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

      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: receives the answer, never null