如何在 If 语句之后放置插页式广告?

how to place Interstitial Ad After If Statement?

我在我的应用程序中实现了插页式代码,但我想要 if-else 语句中的插页式代码..那该怎么办?

试试这个。

if (url.endsWith(".mp3")){
  // your ad view should be visible here. and load ad here.
}else{
 // your ad view should be gone here.
}