Documentation

Here you will find all the info you need to integrate the various monetization tools OfferToro has to offer.

Unity SDK

SDK version 1.2
Updated: Feb 23, 2017

5. Non-Incent OfferWall

  • Step 1. Initialize the Non-Incent OfferWall

    In order to initialize Non-Incent OfferWall, the following parameters should be passed in initialization call: APP_ID, SECRET_KEY and USER_ID.

    The call should look similar to:

    public static string YOUR_NI_APP_ID = ""; //set your value
    public static string YOUR_NI_SECRET_KEY = ""; //set your value
    public static string YOUR_NI_USER_ID = ""; //set your value
    
    OTNonIncentSettings.Instance.configInit(YOUR_NI_APP_ID,
                       YOUR_NI_SECRET_KEY, YOUR_NI_USER_ID);

    Note:

    • - APP_ID and SECRET_KEY can be found in your OfferToro account, under your "App Placement" settings.
    • - USER_ID, is a parameter which should be passed from your end as a unique ID for each end user of your app.
  • Step 2. Create OfferToro SDK instance

    OfferToro SDK instances should be created in the MonoBehaviour class in Start() method by calling the following method:

    DelegateController.Instance.Create();

  • Step 3. Display the Non-Incent OfferWall

    After being successfully initialized, Non-Incent OfferWall could be displayed into the app. For displaying the Non-Incent OfferWall ShowNonIncentOfferWall() method should be called:

    SDKInit.Instance.ShowNonIncentOfferWall();

  • Step 4. Subscribe Non-Incent OfferWall actions:

    The OfferToro SDK gives a possibility to be notified of events happening in the Non-Incent OfferWall lifecycle via the Non-Incent OfferWall actions.

    The following actions are available:

    Action InitSuccessNIAction - invoked when Non-Incent OfferWall is successfully initialized;

    Action InitFailNIAction - invoked when Non-Incent OfferWall initialization fails and receives (@param type string - errorMessage) describing the reason for fail;

    Action OpenNIAction - invoked when Non-Incent OfferWall is displayed;

    Action CloseNIAction - invoked when Non-Incent OfferWall is closed;

    To be notified of Non-Incent OfferWall events, you need to subscribe to actions in Start() method of your MonoBehaviour class and then unsubscribe in Destroy() method of your MonoBehaviour class.

    For example:

    void Start() {
             OTNonIncentSettings.Instance.configInit(YOUR_NI_APP_ID,
                       YOUR_NI_SECRET_KEY, YOUR_NI_USER_ID);
     DelegateController.Instance.InitSuccessNIAction += OnNIInitSuccess;
     DelegateController.Instance.Create();
    }
    
    void Destroy(){
        DelegateController.Instance.InitSuccessNIAction -= OnNIInitSuccess;
    }

    Where OnNIInitSuccess is the method that you intend to subscribe to InitSuccessNIAction action.