I have implemented admob in my iPhone app, but the view which was created should be toggled based on my javascript’s condition. So, i need to toggle that view using cordova plugins. Is there any possibility of toggling the admob view using phonegap?
Share
I’m going to assume that by toggle you mean you want to hide the view. You could also mean you want to request a new ad but regardless I think the logic would be the same.
If you’ve set up your AdMob code as a plugin, you can write some js that calls into that (you might be able to do this even if you haven’t). So the javascript method might look like:
Then in your native code that handles the AdMob view, you can do something like this: