D. Other Functions

1) Inquiry Publishing State

When you stop publishing ads, no ads will not be displayed in offerwall. For good user experience, you had better hide offerwall buttons when your app is not in publishing state. This method inquiries current state of your app in async way.

  - void TnkAdPlugin::queryPublishState(int handleId)

 handleId When a return values is arrived, it is delivered to onReturnQueryPublishState(int handleId, int pubState) method of TnkAdEventHandler with this values in the first parameter. Current state of your app is returned as second parameter. TNK_PUB_STATE_YES (1)  means your apps is in publishing state.

Sample Code

bool HelloWorld::init()


    // check publishing state on game start   



void HelloWorld::onReturnQueryPublishState(int handlerId, int pubState) {

    if (pubState == TNK_PUB_STAT_YES) {

        // show offerwall button


    else {

        // hide offerwall button