Hi,
Mobile ads SDK doesn't have any method which will help to fetch destination URL directly through the code.Incase your action is not working then you can go for custom button redirection integration with the help of adCallToAction method which is mentioned below.
Firstly, you will have to create a Native AdView object and set the constraints to fill its container. Once it is done, you will have to associate the content ad view with the content ad objects. This is required to make the ads clickable. Then populate the content ad view with its respective assets.
While populating the AdView with NativeAd assets make sure that you set
nativeAdView.callToActionView = unifiedAdBinding.adCallToAction
The
NativeAdView
will automatically handle clicks on registered views. The Google Mobile Ads SDK processes clicks and directs the user to the appropriate destination URL associated with the ad.
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJ1jV:ref" (ADR-00235662)
Thanks,
![Google Logo](https://ci5.googleusercontent.com/proxy/9ju5nEgrbHdGK5lig8X4MQGTM97n8nSbSJ60DOc1vPdXe8gGNPklA-zA7hXOkDgnMgO9hHT2x1N3rPhJg-wqpPZKMcC8T4A2ylAWasD7e8BJotDEo7M=s0-d-e1-ft#https://www.gstatic.com/images/branding/product/1x/googleg_64dp.png) |
Mobile Ads SDK Team |
![](https://ci3.googleusercontent.com/proxy/KtHQ7FffeSUse9yjVyN-9hMmatYJcpoNxPGa-Ve7qxkcwxBtpEKE8Q7imFk-c6yXMlohB9BtgykNT30XhjIqgIPAtPj03u9Z8eZi6Y3Eh1wUQYo4S4tUxpUWDWqLOWQ2NROHEk332B2Nf_VnBDiefYGdJHWFNOJldb3ZArf8LJLHuOqpe783Kpg_arFHYmA=s0-d-e1-ft#https://google-dev-relations.my.salesforce.com/servlet/servlet.ImageServer?oid=00D1U000001174p&esid=0184Q00001PXady&from=ext)