Issues with placing ads in Android app
I'm using AdMob to serve up ads at the bottom of each window of my Android app. I have a ad.js file that I include in each window:
var adUrl = "myadurl";
var adWebView = Ti.UI.createWebView({
url: adUrl, /*opacity: 0.5,*/ zIndex: 20,
height: 55, bottom: 0, left: 0, right: 0, scalesPageToFit: true
});
win.add(adWebView);
This somewhat works. There are two issues though:
- Even though the ad fits perfectly at the bottom of the screen, the web view is adding a vertical scrollbar. Is there a way to disable this scrollbar while still allowing the user to click on the ad?
- When you click on the ad, it tries to open the location within the small webview. How do I make it open the ad in a web browser over top of my app?
2 Answers
-
What you can better do is getting the onclick event of the webview and make it open a web browser with the url and then turn touchenabled on false.
-
Anyone else have ideas of how this can be done? I'm sure some of you have ads on your apps, right?