Ad Manager - AndroidTV (general usage, click action)

103 views
Skip to first unread message

Maxence Bourdin

unread,
Jul 6, 2021, 12:39:01 AM7/6/21
to Google Mobile Ads SDK Developers
Hello Team,

I'm currently working on implementing the Mobile Ads SDK (ad manager, not admob). My goal is to use a simple banner (can be html5) with an click through URL action. I want to launch the playstore on a click or the app itself if it is already installed. By using the default behaviour provide by the SDK when a click is perform, I just get a message that said "No application can handle this action".

But I manage to get it work by using the AppEventListener feature. 
HTML: 

admob.events.dispatchAppEvent("clickAction", "com.ted.android.tv");

Android: 

adView.appEventListener = object : com.google.android.gms.ads.admanager.AppEventListener {
override fun onAppEvent(name: kotlin.String, info: kotlin.String) {
println("maxdebug $name - $info")

if(name == "clickAction"){
th...@MainActivity.openPackage(this@MainActivity, info)
}
}
}


I would like to know if it is a proper way of using the SDK? 
And does it break some Google policy?
Is there is any better way of implementing this feature?

Thanks in advance
Regards
Max

Mobile Ads SDK Forum Advisor

unread,
Jul 6, 2021, 5:10:32 AM7/6/21
to maxenceb...@gmail.com, google-adm...@googlegroups.com
Hi there,

Thank you for reaching out to us.

With regard to your concern, your implementation is technically possible. However, we cannot comment if this is permissible with regard to implementation policy. As long as you followed the implementation guidance (with regard to displaying an ad), then your app will be fine.

Regards,
Google Logo
Teejay Wennie Pimentel
Mobile Ads SDK Team
 

 

ref:_00D1U1174p._5004Q2JYr5K:ref
Reply all
Reply to author
Forward
0 new messages