User Acquisition SDK

Diogo Pires edited this page Aug 1, 2018 · 1 revision

Getting Started

To integrate the User Acquisition SDK, you only need to create an instance of the AdsSdk interface. In the sample code, we create an instance of the User Acquisition SDK interface in the Application class . Afterwards you only need to initialise the proof-of-attention (PoA) process.

  private static AppCoinsAds adsSdk;

  @Override public void onCreate() {
    super.onCreate();

    adsSdk = new AppCoinsAdsBuilder().withDebug(true)
        .createAdvertisementSdk(this);
    adsSdk.init(this);
  }

The debug flag will set the User Acquisition SDK to use the testnet (Ropsten) instead of the mainnet.

Please note that the calling of the init() is required to be done as soon as possible. For that reason, we recommend doing it on the onCreate() of the Application class so the SDK is aware of the application's Activities life cycle.

After the SDK configuration and initialisation, and as soon as any Activity or your application is started, the SDK will be able to detect when your application is in the foreground and will handle the proof-of-attention (PoA) process.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.