5

I'm implementing native custom template ad in my android app and in my code I am fetching and rendering custom template ad in my view. I want to open the Webview when the user clicks on the ad with the click-through URL that I set in my dfp portal but I don't see any method or documentation on how to get hold of that URL.

from nativeCustomTemplateAd.getAvailableAssetNames(); I get only three key none of them are URL key. how I get URL which is in "f" as shown in the screenshot.


enter image description here

How to get ad URL?

INDRAJITH EKANAYAKE
  • 3,894
  • 11
  • 41
  • 63
Gautam Kushwaha
  • 281
  • 3
  • 15
  • 2
    I found solution : The forCustomTemplateAd method accepts an OnCustomClickListener. If you pass a listener object in, the SDK instead invokes its onCustomClick method and takes no further action. If you pass a null value as the listener, however, the SDK falls back to the deeplink and/or destination URLs registered with the ad. So I found my click url action with pass null parameter instead of OnCustomClickListener – Gautam Kushwaha Dec 28 '17 at 05:43

1 Answers1

0

I also came across this scenario. The Click-Through URL was not accessible from the NativeCustomTemplateAd object. To open the ad in a webview when use clicks on it, Add the Click through URL in an optional field such as StandardURL and when user clicks on the ad, get it by calling nativeCustomTemplateAd.getText("StandardURL").toString() and load this url in a webview.