You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _drafts/2019-04-29-admob.md
+50-1Lines changed: 50 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -183,4 +183,53 @@ class RewarderVideoAdActivity : AppCompatActivity(), RewardedVideoAdListener {
183
183
{% endhighlight %}
184
184
185
185
## Reklama natywna
186
-
//TODO
186
+
Reklamy natywne (`native ads`) składają się z zasobów reklamowych, które są wyświetlane za pośrednictwem standardowych natywnych widoków interfejsu użytkownika. Dzięki temu treść otrzymanych reklam może być sformatowana w taki sposób, aby pasowała do szaty graficznej aplikacji. Aby dodać reklamę natywną należy przy użyciu instancji `AdLoader` uzyskać obiekt `UnifiedNativeAd` zawierający zasoby reklamowe, zaimplementować obiekty słuchaczy, stworzyć kontrolki widoku osadzone w rodzicu `UnifiedNativeAdView`, a następnie wyświetlić załadowaną reklamę w widoku. Reklamy natywne wspierają także materiały wideo oraz obsługę preferencji niepożądanej treści.
187
+
188
+
{% highlight kotlin %}
189
+
class NativeAdActivity : AppCompatActivity() {
190
+
191
+
private lateinit var adLoader: AdLoader
192
+
193
+
override fun onCreate(savedInstanceState: Bundle?) {
0 commit comments