Hey guys can anyonr please help me out ? I need the syntax for remove ads IAP for corona sdk. I tried to implement it by my self but failed. And also if possibile can you give me the code to show chartboost or vungle ad after game over.
1 Answers
1
votes
There isn't a specific code for this. A lot depends on how you have your app implemented. But the basics are this:
Set a flag if you want to show ads or not:
local showAds = true
Then in your code, wrap the ads.show() call with something like:
if showAds then ads.show("banner") -- or interstital or however you call it. end
In your IAP code, when you detect a purchase and the purchase happens to be the purchase that turns off ads then do:
showAds = false
You will need to save that information out and when you restart the app, read that value to determine what to initialize your app too.