Reputation: 468
I am trying to integrate MobPartner ads in my app, the ads from MobPartner can be displayed from "Pools" which contain several ads which automaticly scroll sideways and are set which an individual click link. The page with the ads looks like this, when I set the URL of the WebViewer in AI2, the ads display and scroll as they should.
The problem I have is detecting a click on one of the ads, this is the best I got to: If a user would click on one of the ads via the WebViewer it will redirect them to the automatic URL set by the advertiser. I will then use the link and set ActivityStarter to WebViewer1.CurrentUrl and start the website full screen instead of the ad resolution (320x48).
I would like to know if there is a way to detect any clicks within WebViewer so that I can start ActivityStarter faster with the link. If not, is there a way to check the URL of the link clicked in WebViewer before the target website loads. In my opinion the timer (set to 1000 interval) is an inefficient way of checking if an ad is clicked. Anyone able to answer my questions above or provide a way of improving this code? Much appreciated.
PS: The HomeUrl for WebViewer has been pre-defined in the designer as well as the ActivityStarter "Action".
Thank you!
Upvotes: 2
Views: 2122
Reputation: 6293
There is no possibility to detect any clicks within the Webviewer
. The only thing you can detect is an URL change with the Clock
component, and this is what you are already doing.
What you could do is to reduce the timer interval
or instead of opening the webpage with the Activity Starter
, just stay in the Webviewer
and set its height
and width
to fill parent
, which is -2 in the Blocks Editor, and hide all the other components on the screen to be able to view only that webpage in full screen.
Upvotes: 0