TapForTap Plugin not calling the callback in success

Helo there, i’m adding tapfortap support in one upcoming game of my company and the callback that I register is not being called at sucessfull events

  • name: The name of the libray passing the event. This will always be tapfortap.
  • event: The name of the event. Possible events include.
    • receive: Fired when a new ad was received.
    • show: Fired when the ad was shown.
    • dismiss: Fired when the ad was dismissed.
    • fail: Fired when an ad failed to download. This event populates the message key with the failure reason.
  • message: Any extra data that the event passes along. Only the fail event uses the message key to send along the failure reason.

 

this is from the documentation for the plugin, the callback is only called on error. This is wrong, i need it on success so I can get the dismiss property

Indeed that is a bug. If you set the AppWall and Interstitial listeners before any other calls to tapfortap.appwall or tapfortap.insterstital then you should be able to get the events.

[lua]

– The app wall listener function. Prints the event’s name and message to the console.

local function appWallListener(event)

    print(event.name, "appWallListener " … event.event … " " … event.message)

end

– The interstitial listener function. Prints the event’s name and message to the console.

local function interstitialListener(event)

    print(event.name, "interstitialListener " … event.event … " " … event.message)

end

– Set the app wall listener

tapfortap.setAppWallListener(appWallListener)

– Set the interstitial listener

tapfortap.setInterstitialListener(interstitialListener)

– Now it is safe to call show and prepare in order to get call back events.

tapfortap.showInterstitial()

[/lua]

I have pushed a fix for this and it will be available the next time the Tap for Tap plugin gets updated.

Indeed that is a bug. If you set the AppWall and Interstitial listeners before any other calls to tapfortap.appwall or tapfortap.insterstital then you should be able to get the events.

[lua]

– The app wall listener function. Prints the event’s name and message to the console.

local function appWallListener(event)

    print(event.name, "appWallListener " … event.event … " " … event.message)

end

– The interstitial listener function. Prints the event’s name and message to the console.

local function interstitialListener(event)

    print(event.name, "interstitialListener " … event.event … " " … event.message)

end

– Set the app wall listener

tapfortap.setAppWallListener(appWallListener)

– Set the interstitial listener

tapfortap.setInterstitialListener(interstitialListener)

– Now it is safe to call show and prepare in order to get call back events.

tapfortap.showInterstitial()

[/lua]

I have pushed a fix for this and it will be available the next time the Tap for Tap plugin gets updated.