Site icon C1CTech

Implementing AdColony Ad (Banner/Interstitial/Rewarded) SDK in Android

&NewLine;<p>This post is about how to implement AdColony Ads &lpar;Banner&sol;Interstitial&sol;Rewarded&rpar; SDK in android application with the help of simple <span style&equals;"color&colon; &num;008000&semi;"><strong>AdColonyDemo<&sol;strong><&sol;span> Application&period; AdColony allows you to monetize your app by displaying ads&period;<&sol;p> &NewLine; &NewLine; &NewLine; &NewLine;<div class&equals;"wp-block-buttons is-content-justification-center is-layout-flex wp-block-buttons-is-layout-flex"> &NewLine;<div class&equals;"wp-block-button"><a class&equals;"wp-block-button&lowbar;&lowbar;link has-white-color has-text-color has-background" style&equals;"background-color&colon; &num;03136f&semi;" href&equals;"https&colon;&sol;&sol;github&period;com&sol;arunk7839&sol;AndroidAdColonyExp"><strong>DOWNLOAD CODE<&sol;strong><&sol;a><&sol;div> &NewLine;<&sol;div> &NewLine;<p><amp-youtube layout&equals;"responsive" width&equals;"1200" height&equals;"675" data-videoid&equals;"v7CWUIMA1Zc" title&equals;"Implementing AdColony Ads &lpar;Banner&sol;Interstitial&sol;Rewarded&rpar; SDK in Android"><a placeholder href&equals;"https&colon;&sol;&sol;youtu&period;be&sol;v7CWUIMA1Zc"><img src&equals;"https&colon;&sol;&sol;i&period;ytimg&period;com&sol;vi&sol;v7CWUIMA1Zc&sol;hqdefault&period;jpg" layout&equals;"fill" object-fit&equals;"cover" alt&equals;"Implementing AdColony Ads &lpar;Banner&sol;Interstitial&sol;Rewarded&rpar; SDK in Android"><&sol;a><&sol;amp-youtube><&sol;p> &NewLine;<h3><strong><span style&equals;"color&colon; &num;000080&semi;">Creating AdColonyDemo App<&sol;span><&sol;strong><&sol;h3> &NewLine;<p>In <span style&equals;"color&colon; &num;0000ff&semi;"><strong>AdColonyDemo<&sol;strong><&sol;span> Application&comma; we have two buttons that will display Interstitial and Reward video Ads respectively on button click and at the bottom of the app screen&comma; we will display the banner ad&period;<&sol;p> &NewLine;<p>To create AdColonyDemo App&comma; follow the steps as shown below&colon;<&sol;p> &NewLine;<h4 id&equals;"step&lowbar;1&lowbar;set&lowbar;up&lowbar;adcolony" role&equals;"presentation" data-text&equals;"Step 1&colon; Set up AdColony"><strong><span class&equals;"devsite-heading" style&equals;"color&colon; &num;000080&semi;" role&equals;"heading" aria-level&equals;"2">Step 1&colon; Set up AdColony<&sol;span><&sol;strong><&sol;h4> &NewLine;<ul> &NewLine;<li><a href&equals;"https&colon;&sol;&sol;clients&period;adcolony&period;com&sol;signup"><strong><span style&equals;"color&colon; &num;008000&semi;">Sign up<&sol;span><&sol;strong><&sol;a> and <a href&equals;"https&colon;&sol;&sol;clients&period;adcolony&period;com&sol;login"><span style&equals;"color&colon; &num;008000&semi;"><strong>log in<&sol;strong><&sol;span><&sol;a> to your AdColony account&period; <&sol;li> &NewLine;<li>After creating an account select <span style&equals;"color&colon; &num;0000ff&semi;"><strong>MONETIZATION -&gt&semi; Setup New App<&sol;strong><&sol;span>&period;<&sol;li> &NewLine;<li>Now fill details according to your requirements and then finally click on <span style&equals;"color&colon; &num;0000ff&semi;"><strong>create <&sol;strong><&sol;span>button&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<p><img class&equals;"alignnone wp-image-2844 size-full" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;img1-e1634661292867&period;png" alt&equals;"" width&equals;"697" height&equals;"461" &sol;><&sol;p> &NewLine;<p><img class&equals;"alignnone wp-image-2845 size-full" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;imgAdskip-e1634661258170&period;png" alt&equals;"" width&equals;"852" height&equals;"125" &sol;><&sol;p> &NewLine;<p><img class&equals;"alignnone size-large wp-image-2848" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;CoppaAct-1024x149&period;png" alt&equals;"" width&equals;"1024" height&equals;"149" &sol;><&sol;p> &NewLine;<p><img class&equals;"alignnone wp-image-2846 size-large" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;Adaudiosett-e1634661218935-1024x258&period;png" alt&equals;"" width&equals;"1024" height&equals;"258" &sol;><&sol;p> &NewLine;<p><img class&equals;"alignnone wp-image-2847 size-large" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;imgAds-e1634661334949-1024x466&period;png" alt&equals;"" width&equals;"1024" height&equals;"466" &sol;><&sol;p> &NewLine;<h4 role&equals;"presentation" data-text&equals;"Step 1&colon; Set up AdColony"> <&sol;h4> &NewLine;<h4 role&equals;"presentation" data-text&equals;"Step 1&colon; Set up AdColony"><strong><span class&equals;"devsite-heading" style&equals;"color&colon; &num;000080&semi;" role&equals;"heading" aria-level&equals;"2">Step 2&colon; <&sol;span><&sol;strong><span style&equals;"color&colon; &num;000080&semi;"><strong>Creating Ad Zone Id<&sol;strong><&sol;span><&sol;h4> &NewLine;<ul> &NewLine;<li>Click on created app&period; You will see a unique <span style&equals;"color&colon; &num;008000&semi;"><strong>AdColony App UUID<&sol;strong><&sol;span> is generated &lpar;we will need this later&rpar;&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<p><img class&equals;"alignnone size-full wp-image-2849" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;AdColonyAppCreatednew&period;png" alt&equals;"" width&equals;"491" height&equals;"463" &sol;><&sol;p> &NewLine;<ul> &NewLine;<li> Click on<span style&equals;"color&colon; &num;0000ff&semi;"><strong> Setup New Ad Zone<&sol;strong><&sol;span> to create ad units &lpar;Banner&sol;Interstitial&sol;Rewarded&rpar;&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<h5><span style&equals;"color&colon; &num;000080&semi;"><strong>Creating Banner Ad <&sol;strong><&sol;span><&sol;h5> &NewLine;<ul> &NewLine;<li>To create banner ad&comma; fill details according to your requirement and then finally click on <span style&equals;"color&colon; &num;0000ff&semi;"><strong>create <&sol;strong><&sol;span>button&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<p><img class&equals;"alignnone size-full wp-image-2850" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;AdZone&period;png" alt&equals;"" width&equals;"680" height&equals;"515" &sol;><&sol;p> &NewLine;<p><img class&equals;"alignnone wp-image-2851 size-large" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;next-e1634661961426-1024x609&period;png" alt&equals;"" width&equals;"1024" height&equals;"609" &sol;><&sol;p> &NewLine;<p><img class&equals;"alignnone wp-image-2852 size-full" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;AdSkipping-e1634661894966&period;png" alt&equals;"" width&equals;"659" height&equals;"474" &sol;><&sol;p> &NewLine;<ul> &NewLine;<li>Open the created banner ad&period; You will see a unique zone id is created &lpar;we will need this later&rpar;&period; Similarly a unique zone id will generate for each ad &lpar;Banner&sol;Interstitial&sol;Rewarded&rpar; that you create&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<p><img class&equals;"alignnone size-full wp-image-2855" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;bannerAdZoneId-1&period;png" alt&equals;"" width&equals;"555" height&equals;"570" &sol;><&sol;p> &NewLine;<h5> <&sol;h5> &NewLine;<h5><span style&equals;"color&colon; &num;000080&semi;"><strong>Creating Interstitial Ad <&sol;strong><&sol;span><&sol;h5> &NewLine;<ul> &NewLine;<li>To create Interstitial ad&comma; fill details according to your requirement and then finally click on <span style&equals;"color&colon; &num;0000ff&semi;"><strong>create <&sol;strong><&sol;span>button&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<p><img class&equals;"alignnone size-full wp-image-2856" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;interstitialAd1&period;png" alt&equals;"" width&equals;"650" height&equals;"538" &sol;><&sol;p> &NewLine;<p><img class&equals;"alignnone size-full wp-image-2857" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;interAd2&period;png" alt&equals;"" width&equals;"1024" height&equals;"381" &sol;><&sol;p> &NewLine;<p><img class&equals;"alignnone size-large wp-image-2858" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;interAd3-1024x510&period;png" alt&equals;"" width&equals;"1024" height&equals;"510" &sol;><&sol;p> &NewLine;<p><img class&equals;"alignnone size-full wp-image-2859" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;interAd4&period;png" alt&equals;"" width&equals;"683" height&equals;"279" &sol;><&sol;p> &NewLine;<h5> <&sol;h5> &NewLine;<h5><span style&equals;"color&colon; &num;003366&semi;"><strong>Creating Rewarded Ad <&sol;strong><&sol;span><&sol;h5> &NewLine;<ul> &NewLine;<li>To create a Rewarded ad&comma; fill details according to your requirement and then finally click on <span style&equals;"color&colon; &num;0000ff&semi;"><strong>create <&sol;strong><&sol;span>button&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<p><img class&equals;"alignnone size-full wp-image-2861" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;R1&period;png" alt&equals;"" width&equals;"666" height&equals;"516" &sol;><&sol;p> &NewLine;<p><img class&equals;"alignnone size-large wp-image-2862" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;R2-1024x742&period;png" alt&equals;"" width&equals;"1024" height&equals;"742" &sol;><&sol;p> &NewLine;<p><img class&equals;"alignnone wp-image-2863 size-large" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;R3-e1634662870806-1024x465&period;png" alt&equals;"" width&equals;"1024" height&equals;"465" &sol;><&sol;p> &NewLine;<p><img class&equals;"alignnone wp-image-2864 size-full" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;R4-e1634662906281&period;png" alt&equals;"" width&equals;"758" height&equals;"388" &sol;><&sol;p> &NewLine;<ul> &NewLine;<li>We have created three different ads for <span style&equals;"color&colon; &num;008000&semi;"><strong>AdColonyDemo<&sol;strong><&sol;span> Application&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<p><img class&equals;"alignnone size-large wp-image-2860" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;AllAd-1024x121&period;png" alt&equals;"" width&equals;"1024" height&equals;"121" &sol;><&sol;p> &NewLine;<h6> <&sol;h6> &NewLine;<h4 role&equals;"presentation" data-text&equals;"Step 1&colon; Set up AdColony"><strong><span class&equals;"devsite-heading" style&equals;"color&colon; &num;000080&semi;" role&equals;"heading" aria-level&equals;"2">Step 3&colon;<&sol;span><&sol;strong><span style&equals;"color&colon; &num;000080&semi;"><strong> Integrate AdColony ads in app<&sol;strong><&sol;span><&sol;h4> &NewLine;<ul> &NewLine;<li>At app-level<span style&equals;"color&colon; &num;008000&semi;"><strong> build&period;gradle<&sol;strong><&sol;span> file add below dependencies and <span style&equals;"color&colon; &num;0000ff&semi;"><strong>sync<&sol;strong><&sol;span> project&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<p><span style&equals;"color&colon; &num;0000ff&semi;"><strong>build&period;gradle<&sol;strong><&sol;span><&sol;p> &NewLine;<pre>dependencies &lbrace;<br &sol;> implementation 'com&period;adcolony&colon;sdk&colon;4&period;6&period;4'<br &sol;> implementation 'com&period;google&period;android&period;gms&colon;play-services-ads-identifier&colon;17&period;0&period;0'<br &sol;>&rcub;<&sol;pre> &NewLine;<ul> &NewLine;<li>In the manifest file add <span style&equals;"color&colon; &num;008000&semi;"><strong>internet<&sol;strong><&sol;span> and <span style&equals;"color&colon; &num;008000&semi;"><strong>vibrate<&sol;strong><&sol;span> permission and inside the application&comma; tag add attribute <strong><span style&equals;"color&colon; &num;0000ff&semi;">android&colon;usesCleartextTraffic&equals;”true”<&sol;span><&sol;strong>&period; Also&comma; add two AdColony activities inside the application tag&comma; it is requirement for ads&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<p><span style&equals;"color&colon; &num;0000ff&semi;"><strong>AndroidManifest&period;xml<&sol;strong><&sol;span><&sol;p> &NewLine;<pre>&lt&semi;&quest;xml version&equals;"1&period;0" encoding&equals;"utf-8"&quest;&gt&semi;<br &sol;>&lt&semi;manifest xmlns&colon;android&equals;"http&colon;&sol;&sol;schemas&period;android&period;com&sol;apk&sol;res&sol;android"<br &sol;> package&equals;"com&period;c1ctech&period;adcolonydemo"&gt&semi;<br &sol;><br &sol;> <span style&equals;"color&colon; &num;008000&semi;"><strong> &lt&semi;uses-permission android&colon;name&equals;"android&period;permission&period;INTERNET" &sol;&gt&semi;<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &lt&semi;uses-permission android&colon;name&equals;"android&period;permission&period;ACCESS&lowbar;NETWORK&lowbar;STATE" &sol;&gt&semi;<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &lt&semi;uses-permission android&colon;name&equals;"android&period;permission&period;VIBRATE" &sol;&gt&semi;<&sol;strong><&sol;span><br &sol;><br &sol;> &lt&semi;application<br &sol;> android&colon;allowBackup&equals;"true"<br &sol;> android&colon;icon&equals;"&commat;mipmap&sol;ic&lowbar;launcher"<br &sol;> android&colon;label&equals;"&commat;string&sol;app&lowbar;name"<br &sol;> android&colon;roundIcon&equals;"&commat;mipmap&sol;ic&lowbar;launcher&lowbar;round"<br &sol;> android&colon;supportsRtl&equals;"true"<br &sol;> android&colon;theme&equals;"&commat;style&sol;Theme&period;AdColonyDemo"<br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;">android&colon;usesCleartextTraffic&equals;"true"<&sol;span><&sol;strong>&gt&semi;<br &sol;> &lt&semi;activity<br &sol;> android&colon;name&equals;"&period;MainActivity"<br &sol;> android&colon;exported&equals;"true"&gt&semi;<br &sol;> &lt&semi;intent-filter&gt&semi;<br &sol;> &lt&semi;action android&colon;name&equals;"android&period;intent&period;action&period;MAIN" &sol;&gt&semi;<br &sol;><br &sol;> &lt&semi;category android&colon;name&equals;"android&period;intent&period;category&period;LAUNCHER" &sol;&gt&semi;<br &sol;> &lt&semi;&sol;intent-filter&gt&semi;<br &sol;> &lt&semi;&sol;activity&gt&semi;<br &sol;> <span style&equals;"color&colon; &num;008000&semi;"><strong> &lt&semi;activity<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> android&colon;name&equals;"com&period;adcolony&period;sdk&period;AdColonyInterstitialActivity"<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> android&colon;configChanges&equals;"keyboardHidden&vert;orientation&vert;screenSize"<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> android&colon;hardwareAccelerated&equals;"true"<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> android&colon;theme&equals;"&commat;android&colon;style&sol;Theme&period;Black&period;NoTitleBar&period;Fullscreen" &sol;&gt&semi;<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &lt&semi;activity<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> android&colon;name&equals;"com&period;adcolony&period;sdk&period;AdColonyAdViewActivity"<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> android&colon;configChanges&equals;"keyboardHidden&vert;orientation&vert;screenSize"<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> android&colon;hardwareAccelerated&equals;"true"<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> android&colon;theme&equals;"&commat;android&colon;style&sol;Theme&period;Black&period;NoTitleBar&period;Fullscreen" &sol;&gt&semi;<&sol;strong><&sol;span><br &sol;> &lt&semi;&sol;application&gt&semi;<br &sol;><br &sol;>&lt&semi;&sol;manifest&gt&semi;<&sol;pre> &NewLine;<ul> &NewLine;<li>In <span style&equals;"color&colon; &num;008000&semi;"><strong>proguard-rules&period;pro<&sol;strong><&sol;span> file add below ProGuard Configuration&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<p><span style&equals;"color&colon; &num;0000ff&semi;"><strong>proguard-rules&period;pro<&sol;strong><&sol;span><&sol;p> &NewLine;<pre>&num; For communication with AdColony's WebView<br &sol;>-keepclassmembers class &ast; &lbrace;<br &sol;> &commat;android&period;webkit&period;JavascriptInterface &lt&semi;methods&gt&semi;&semi;<br &sol;>&rcub;<&sol;pre> &NewLine;<h5><span style&equals;"color&colon; &num;000080&semi;"><strong>Creating Layout file<&sol;strong><&sol;span><&sol;h5> &NewLine;<p>The <strong><span style&equals;"color&colon; &num;008000&semi;">activity&lowbar;main&period;xml<&sol;span><&sol;strong> file contains a LinearLayout to show banner ad and two buttons on click of which we will show Interstitial and Rewarded video ad&period;<&sol;p> &NewLine;<p><strong><span style&equals;"color&colon; &num;0000ff&semi;">activity&lowbar;main&period;xml<&sol;span><&sol;strong><&sol;p> &NewLine;<pre>&lt&semi;&quest;xml version&equals;"1&period;0" encoding&equals;"utf-8"&quest;&gt&semi;<br &sol;>&lt&semi;androidx&period;constraintlayout&period;widget&period;ConstraintLayout xmlns&colon;android&equals;"http&colon;&sol;&sol;schemas&period;android&period;com&sol;apk&sol;res&sol;android"<br &sol;> xmlns&colon;app&equals;"http&colon;&sol;&sol;schemas&period;android&period;com&sol;apk&sol;res-auto"<br &sol;> xmlns&colon;tools&equals;"http&colon;&sol;&sol;schemas&period;android&period;com&sol;tools"<br &sol;> android&colon;layout&lowbar;width&equals;"match&lowbar;parent"<br &sol;> android&colon;layout&lowbar;height&equals;"match&lowbar;parent"<br &sol;> tools&colon;context&equals;"&period;MainActivity"&gt&semi;<br &sol;><br &sol;> &lt&semi;Button<br &sol;> android&colon;id&equals;"&commat;&plus;id&sol;btnInterstitialAd"<br &sol;> android&colon;layout&lowbar;width&equals;"match&lowbar;parent"<br &sol;> android&colon;layout&lowbar;height&equals;"wrap&lowbar;content"<br &sol;> android&colon;layout&lowbar;margin&equals;"10dp"<br &sol;> android&colon;onClick&equals;"showInterstitialAd"<br &sol;> android&colon;padding&equals;"15dp"<br &sol;> android&colon;text&equals;"Show Interstitial Ad"<br &sol;> app&colon;layout&lowbar;constraintEnd&lowbar;toEndOf&equals;"parent"<br &sol;> app&colon;layout&lowbar;constraintHorizontal&lowbar;bias&equals;"0&period;5"<br &sol;> app&colon;layout&lowbar;constraintStart&lowbar;toStartOf&equals;"parent"<br &sol;> app&colon;layout&lowbar;constraintTop&lowbar;toTopOf&equals;"parent"<br &sol;> app&colon;layout&lowbar;constraintVertical&lowbar;weight&equals;"1" &sol;&gt&semi;<br &sol;><br &sol;> &lt&semi;Button<br &sol;> android&colon;id&equals;"&commat;&plus;id&sol;btnRewardVideoAd"<br &sol;> android&colon;layout&lowbar;width&equals;"match&lowbar;parent"<br &sol;> android&colon;layout&lowbar;height&equals;"wrap&lowbar;content"<br &sol;> android&colon;layout&lowbar;margin&equals;"10dp"<br &sol;> android&colon;onClick&equals;"showRewardVideoAd"<br &sol;> android&colon;padding&equals;"15dp"<br &sol;> android&colon;text&equals;"Show Reward Video Ad"<br &sol;> app&colon;layout&lowbar;constraintEnd&lowbar;toEndOf&equals;"&commat;&plus;id&sol;btnInterstitialAd"<br &sol;> app&colon;layout&lowbar;constraintStart&lowbar;toStartOf&equals;"&commat;&plus;id&sol;btnInterstitialAd"<br &sol;> app&colon;layout&lowbar;constraintTop&lowbar;toBottomOf&equals;"&commat;&plus;id&sol;btnInterstitialAd"<br &sol;> app&colon;layout&lowbar;constraintVertical&lowbar;weight&equals;"1" &sol;&gt&semi;<br &sol;><br &sol;> &lt&semi;LinearLayout<br &sol;> android&colon;id&equals;"&commat;&plus;id&sol;colony"<br &sol;> android&colon;layout&lowbar;width&equals;"match&lowbar;parent"<br &sol;> android&colon;layout&lowbar;height&equals;"80dp"<br &sol;> android&colon;gravity&equals;"center"<br &sol;> android&colon;orientation&equals;"vertical"<br &sol;> android&colon;padding&equals;"8dp"<br &sol;> app&colon;layout&lowbar;constraintBottom&lowbar;toBottomOf&equals;"parent"<br &sol;> app&colon;layout&lowbar;constraintEnd&lowbar;toEndOf&equals;"parent"<br &sol;> app&colon;layout&lowbar;constraintHorizontal&lowbar;bias&equals;"0&period;5"<br &sol;> app&colon;layout&lowbar;constraintStart&lowbar;toStartOf&equals;"parent"<br &sol;> app&colon;layout&lowbar;constraintVertical&lowbar;weight&equals;"1" &sol;&gt&semi;<br &sol;>&lt&semi;&sol;androidx&period;constraintlayout&period;widget&period;ConstraintLayout&gt&semi;<&sol;pre> &NewLine;<ul> &NewLine;<li>Inside <strong><span style&equals;"color&colon; &num;008000&semi;">MainActivity&period;java&comma;<&sol;span><&sol;strong> add your app id and zone id created for each ad&lpar;Banner&sol;Interstitial&sol;Rewarded&rpar;&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<pre>private final static String APP&lowbar;ID &equals; "ENTER&lowbar;YOUR&lowbar;APP&lowbar;ID"&semi;<br &sol;>private final static String BANNER&lowbar;ZONE&lowbar;ID &equals; "ENTER&lowbar;YOUR&lowbar;BANNER&lowbar;ZONE&lowbar;ID"&semi;<br &sol;>private final static String INTERSTITIAL&lowbar;ZONE&lowbar;ID &equals; "ENTER&lowbar;YOUR&lowbar;INTERSTITIAL&lowbar;ZONE&lowbar;ID"&semi;<br &sol;>private final static String REWARD&lowbar;ZONE&lowbar;ID &equals; "ENTER&lowbar;YOUR&lowbar;REWARD&lowbar;ZONE&lowbar;ID"&semi;<br &sol;>public final static String&lbrack;&rsqb; AD&lowbar;UNIT&lowbar;Zone&lowbar;Ids &equals; new String&lbrack;&rsqb;&lbrace;BANNER&lowbar;ZONE&lowbar;ID&comma; INTERSTITIAL&lowbar;ZONE&lowbar;ID&comma; REWARD&lowbar;ZONE&lowbar;ID&rcub;&semi;<&sol;pre> &NewLine;<ul> &NewLine;<li><strong><span style&equals;"color&colon; &num;0000ff&semi;"> initColonySdk&lpar;&rpar;&colon;<&sol;span><&sol;strong> method which will initialize AdColony SDK&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<pre>private void initColonySdk&lpar;&rpar; &lbrace;<br &sol;> <span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol; Construct optional app options object to be sent with configure<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol; setKeepScreenOn&colon; set a flag on our Activity's window to keep the display from going to sleep&period;<&sol;strong><&sol;span><br &sol;> AdColonyAppOptions appOptions &equals; new AdColonyAppOptions&lpar;&rpar;&period;setKeepScreenOn&lpar;true&rpar;&semi;<br &sol;><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol; Configure AdColony in your launching Activity's onCreate&lpar;&rpar; method so that cached ads can<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol; be available as soon as possible&period;<&sol;strong><&sol;span><br &sol;> AdColony&period;configure&lpar;getApplication&lpar;&rpar;&comma; appOptions&comma; APP&lowbar;ID&comma; AD&lowbar;UNIT&lowbar;Zone&lowbar;Ids&rpar;&semi;<br &sol;>&rcub;<&sol;pre> &NewLine;<h4><span style&equals;"color&colon; &num;000080&semi;"><strong>Implementing Banner Ad<&sol;strong><&sol;span><&sol;h4> &NewLine;<ul> &NewLine;<li><strong><span style&equals;"color&colon; &num;0000ff&semi;">initBannerAd&lpar;&rpar;<&sol;span><&sol;strong> &colon; method will request and load banner ad at the bottom of the screen&period;<&sol;li> &NewLine;<li><strong><span style&equals;"color&colon; &num;0000ff&semi;">bannerListener<&sol;span><&sol;strong>&colon; is defined to write the custom action on a particular ad event&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<pre>private void initBannerAd&lpar;&rpar; &lbrace;<br &sol;> bannerContainer &equals; &lpar;LinearLayout&rpar; findViewById&lpar;R&period;id&period;colony&rpar;&semi;<br &sol;><br &sol;> AdColonyAdViewListener bannerListener &equals; new AdColonyAdViewListener&lpar;&rpar; &lbrace;<br &sol;><br &sol;> <span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol; Code to be executed when an ad request is filled&period;<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol; get adColonyAdView object from adcolony Ad Server&period;<&sol;strong><&sol;span><br &sol;> &commat;Override<br &sol;> public void onRequestFilled&lpar;AdColonyAdView adColonyAdView&rpar; &lbrace;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol;Remove previous ad view if present&period;<&sol;span><&sol;strong><br &sol;> if &lpar;bannerContainer&period;getChildCount&lpar;&rpar; &gt&semi; 0&rpar; &lbrace;<br &sol;> bannerContainer&period;removeView&lpar;bannerAdColony&rpar;&semi;<br &sol;> &rcub;<br &sol;> bannerContainer&period;addView&lpar;adColonyAdView&rpar;&semi;<br &sol;> bannerAdColony &equals; adColonyAdView&semi;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when an ad request is not filled<&sol;span><&sol;strong><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; or when an ad is not loaded&period;<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onRequestNotFilled&lpar;AdColonyZone zone&rpar; &lbrace;<br &sol;> super&period;onRequestNotFilled&lpar;zone&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol;Code to be executed when an ad opens<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onOpened&lpar;AdColonyAdView ad&rpar; &lbrace;<br &sol;> super&period;onOpened&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> <span style&equals;"color&colon; &num;008000&semi;"><strong>&sol;&sol;Code to be executed when user closed an ad<&sol;strong><&sol;span><br &sol;> &commat;Override<br &sol;> public void onClosed&lpar;AdColonyAdView ad&rpar; &lbrace;<br &sol;> super&period;onClosed&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when the user clicks on an ad&period;<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onClicked&lpar;AdColonyAdView ad&rpar; &lbrace;<br &sol;> super&period;onClicked&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;">&sol;&sol; called after onAdOpened&lpar;&rpar;&comma; when a user click opens another app<&sol;span><&sol;strong><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; &lpar;such as the Google Play&rpar;&comma; backgrounding the current app<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onLeftApplication&lpar;AdColonyAdView ad&rpar; &lbrace;<br &sol;> super&period;onLeftApplication&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;> &rcub;&semi;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Optional Ad specific options to be sent with request<&sol;span><&sol;strong><br &sol;> AdColonyAdOptions adOptions &equals; new AdColonyAdOptions&lpar;&rpar;&semi;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol;Request Ad<&sol;span><&sol;strong><br &sol;> AdColony&period;requestAdView&lpar;BANNER&lowbar;ZONE&lowbar;ID&comma; bannerListener&comma; AdColonyAdSize&period;BANNER&comma; adOptions&rpar;&semi;<br &sol;>&rcub;<&sol;pre> &NewLine;<h4><span style&equals;"color&colon; &num;000080&semi;"><strong>Implementing Interstitial Ad<&sol;strong><&sol;span><&sol;h4> &NewLine;<ul> &NewLine;<li><span style&equals;"color&colon; &num;0000ff&semi;"><strong>initInterstitialAd&lpar;&rpar;<&sol;strong><&sol;span>&colon; method will request and load Interstitial Ad&period;<&sol;li> &NewLine;<li><strong><span style&equals;"color&colon; &num;0000ff&semi;">interstitialListener<&sol;span><&sol;strong>&colon; is defined to write the custom action on a particular ad event&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<pre>private void initInterstitialAd&lpar;&rpar; &lbrace;<br &sol;><br &sol;> <span style&equals;"color&colon; &num;008000&semi;"><strong>&sol;&sol; Set up listener for interstitial ad callbacks&period;<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol; Implement only the needed callbacks&period;<&sol;strong><&sol;span><br &sol;> interstitialListener &equals; new AdColonyInterstitialListener&lpar;&rpar; &lbrace;<br &sol;><br &sol;><span style&equals;"color&colon; &num;008000&semi;"> <strong>&sol;&sol; Code to be executed when an ad request is filled&period;<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol; get AdColonyInterstitial object from adcolony Ad Server&period;<&sol;strong><&sol;span><br &sol;> &commat;Override<br &sol;> public void onRequestFilled&lpar;AdColonyInterstitial adIn&rpar; &lbrace;<br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol; Ad passed back in request filled callback&comma; ad can now be shown<&sol;strong><&sol;span><br &sol;> interstitialAdColony &equals; adIn&semi;<br &sol;> isInterstitialLoaded &equals; true&semi;<br &sol;> &rcub;<br &sol;><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol; Code to be executed when an ad request is not filled<&sol;strong><&sol;span><br &sol;> &commat;Override<br &sol;> public void onRequestNotFilled&lpar;AdColonyZone zone&rpar; &lbrace;<br &sol;> super&period;onRequestNotFilled&lpar;zone&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol;Code to be executed when an ad opens<&sol;strong><&sol;span><br &sol;> &commat;Override<br &sol;> public void onOpened&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onOpened&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> <span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol;Code to be executed when user closed an ad<&sol;strong><&sol;span><br &sol;> &commat;Override<br &sol;> public void onClosed&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onClosed&lpar;ad&rpar;&semi;<br &sol;> Toast&period;makeText&lpar;getApplicationContext&lpar;&rpar;&comma; "Ad is closed&excl;"&comma; Toast&period;LENGTH&lowbar;SHORT&rpar;&period;show&lpar;&rpar;&semi;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol;request new Interstitial Ad on close<&sol;span><&sol;strong><br &sol;> AdColony&period;requestInterstitial&lpar;INTERSTITIAL&lowbar;ZONE&lowbar;ID&comma; interstitialListener&comma; interstitialAdOptions&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when the user clicks on an ad&period;<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onClicked&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onClicked&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;">&sol;&sol; called after onAdOpened&lpar;&rpar;&comma; when a user click opens another app<&sol;span><&sol;strong><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; &lpar;such as the Google Play&rpar;&comma; backgrounding the current app<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onLeftApplication&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onLeftApplication&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when an ad expires&period;<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onExpiring&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onExpiring&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;> &rcub;&semi;<br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Optional Ad specific options to be sent with request<&sol;span><&sol;strong><br &sol;> interstitialAdOptions &equals; new AdColonyAdOptions&lpar;&rpar;&semi;<br &sol;> AdColony&period;requestInterstitial&lpar;INTERSTITIAL&lowbar;ZONE&lowbar;ID&comma; interstitialListener&comma; interstitialAdOptions&rpar;&semi;<br &sol;>&rcub;<&sol;pre> &NewLine;<ul> &NewLine;<li><strong><span style&equals;"color&colon; &num;0000ff&semi;">showInterstitialAd&lpar;&rpar;<&sol;span><&sol;strong>&colon; method will show Interstitial ad on button click&period; If ad is not loaded or ad request is not filled from the server then it will show a toast message&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<pre>public void showInterstitialAd&lpar;View view&rpar; &lbrace;<br &sol;> if &lpar;interstitialAdColony &excl;&equals; null &amp&semi;&amp&semi; isInterstitialLoaded&rpar; &lbrace;<br &sol;> interstitialAdColony&period;show&lpar;&rpar;&semi;<br &sol;> isInterstitialLoaded &equals; false&semi;<br &sol;> &rcub; else &lbrace;<br &sol;> Toast&period;makeText&lpar;getApplicationContext&lpar;&rpar;&comma; "Interstitial Ad Is Not Loaded Yet or Request Not Filled"&comma; Toast&period;LENGTH&lowbar;SHORT&rpar;&period;show&lpar;&rpar;&semi;<br &sol;> &rcub;<br &sol;>&rcub;<&sol;pre> &NewLine;<h4><span style&equals;"color&colon; &num;000080&semi;"><strong>Implementing Rewarded Video Ad<&sol;strong><&sol;span><&sol;h4> &NewLine;<ul> &NewLine;<li><strong><span style&equals;"color&colon; &num;0000ff&semi;">initRewardedAd&lpar;&rpar;<&sol;span><&sol;strong>&colon; method will request and load Reward Ad&period;<&sol;li> &NewLine;<li><span style&equals;"color&colon; &num;0000ff&semi;"><strong>rewardListener<&sol;strong><&sol;span>&colon; is defined to write the custom action on a particular ad event&period;<&sol;li> &NewLine;<li><strong><span style&equals;"color&colon; &num;0000ff&semi;">AdColony&period;setRewardListener&lpar;&rpar;&colon;<&sol;span><&sol;strong> is defined to check the result of the reward video if the reward is watched successfully then we will toast <strong>Reward Earned<&sol;strong> else Toast <strong>Reward Cancelled<&sol;strong>&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<pre>private void initRewardedAd&lpar;&rpar; &lbrace;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol;setRewardListener&colon;set the AdColonyRewardListener for global reward callbacks for the app&period;<&sol;span><&sol;strong><br &sol;> AdColony&period;setRewardListener&lpar;new AdColonyRewardListener&lpar;&rpar; &lbrace;<br &sol;><br &sol;> &commat;Override<br &sol;> public void onReward&lpar;AdColonyReward reward&rpar; &lbrace;<br &sol;><br &sol;> if &lpar;reward&period;success&lpar;&rpar;&rpar; &lbrace;<br &sol;> Toast&period;makeText&lpar;getApplicationContext&lpar;&rpar;&comma; "Reward Earned"&comma; Toast&period;LENGTH&lowbar;SHORT&rpar;&period;show&lpar;&rpar;&semi;<br &sol;> &rcub; else &lbrace;<br &sol;> Toast&period;makeText&lpar;getApplicationContext&lpar;&rpar;&comma; "Reward Cancelled"&comma; Toast&period;LENGTH&lowbar;SHORT&rpar;&period;show&lpar;&rpar;&semi;<br &sol;> &rcub;<br &sol;> &rcub;<br &sol;> &rcub;&rpar;&semi;<br &sol;> <span style&equals;"color&colon; &num;008000&semi;"><strong>&sol;&sol; Set up listener for interstitial ad callbacks&period; You only need to implement the callbacks<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol; that you care about&period;<&sol;strong><&sol;span><br &sol;> rewardListener &equals; new AdColonyInterstitialListener&lpar;&rpar; &lbrace;<br &sol;><br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;">&sol;&sol; Code to be executed when an ad request is filled<&sol;span><&sol;strong><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; get AdColonyInterstitial Reward object from adcolony Ad Server<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onRequestFilled&lpar;AdColonyInterstitial adReward&rpar; &lbrace;<br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Ad passed back in request filled callback&comma; ad can now be shown<&sol;span><&sol;strong><br &sol;> rewardAdColony &equals; adReward&semi;<br &sol;> isRewardLoaded &equals; true&semi;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when an ad request is not filled<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onRequestNotFilled&lpar;AdColonyZone zone&rpar; &lbrace;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol;Code to be executed when an ad opens<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onOpened&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onOpened&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol;Code to be executed when user closed an ad <&sol;strong><&sol;span><br &sol;> &commat;Override<br &sol;> public void onClosed&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onClosed&lpar;ad&rpar;&semi;<br &sol;> Toast&period;makeText&lpar;getApplicationContext&lpar;&rpar;&comma; "Ad is closed&excl;"&comma; Toast&period;LENGTH&lowbar;SHORT&rpar;&period;show&lpar;&rpar;&semi;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol;request new reward on close<&sol;span><&sol;strong><br &sol;> AdColony&period;requestInterstitial&lpar;REWARD&lowbar;ZONE&lowbar;ID&comma; rewardListener&comma; rewardAdOptions&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when the user clicks on an ad&period;<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onClicked&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onClicked&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;">&sol;&sol; called after onAdOpened&lpar;&rpar;&comma; when a user click opens another app<&sol;span><&sol;strong><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; &lpar;such as the Google Play&rpar;&comma; backgrounding the current app<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onLeftApplication&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onLeftApplication&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol; Code to be executed when an ad expires&period;<&sol;strong><&sol;span><br &sol;> &commat;Override<br &sol;> public void onExpiring&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onExpiring&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;> &rcub;&semi;<br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Ad specific options to be sent with request<&sol;span><&sol;strong><br &sol;> rewardAdOptions &equals; new AdColonyAdOptions&lpar;&rpar;<br &sol;> &period;enableConfirmationDialog&lpar;false&rpar;<br &sol;> &period;enableResultsDialog&lpar;false&rpar;&semi;<br &sol;> AdColony&period;requestInterstitial&lpar;REWARD&lowbar;ZONE&lowbar;ID&comma; rewardListener&comma; rewardAdOptions&rpar;&semi;<br &sol;>&rcub;<&sol;pre> &NewLine;<ul> &NewLine;<li><span style&equals;"color&colon; &num;0000ff&semi;"><strong>showRewardVideoAd&lpar;&rpar;&colon; <&sol;strong><&sol;span>method will show reward ad on button click&period; If ad is not loaded or ad request not filled from the server then it will show a toast message&period;<&sol;li> &NewLine;<&sol;ul> &NewLine;<pre>public void showRewardVideoAd&lpar;View view&rpar; &lbrace;<br &sol;> if &lpar;rewardAdColony &excl;&equals; null &amp&semi;&amp&semi; isRewardLoaded&rpar; &lbrace;<br &sol;> rewardAdColony&period;show&lpar;&rpar;&semi;<br &sol;> isRewardLoaded &equals; false&semi;<br &sol;> &rcub; else &lbrace;<br &sol;> Toast&period;makeText&lpar;getApplicationContext&lpar;&rpar;&comma; "Reward Ad Is Not Loaded Yet or Request Not Filled"&comma; Toast&period;LENGTH&lowbar;SHORT&rpar;&period;show&lpar;&rpar;&semi;<br &sol;> &rcub;<br &sol;>&rcub;<&sol;pre> &NewLine;<h4><span style&equals;"color&colon; &num;000080&semi;"><strong>Complete Code<&sol;strong><&sol;span><&sol;h4> &NewLine;<p>The <span style&equals;"color&colon; &num;008000&semi;"><strong>MainActivity&period;java<&sol;strong><&sol;span> file contains the following code&colon;<&sol;p>&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;98&period;1 -->&NewLine;<div class&equals;"quads-location quads-ad2" id&equals;"quads-ad2" style&equals;"float&colon;none&semi;margin&colon;0px&semi;">&NewLine;&NewLine;<&sol;div>&NewLine; &NewLine;<p><strong><span style&equals;"color&colon; &num;0000ff&semi;">MainActivity&period;java <&sol;span><&sol;strong><&sol;p> &NewLine;<pre>package com&period;c1ctech&period;adcolonydemo&semi;<br &sol;><br &sol;>import androidx&period;appcompat&period;app&period;AppCompatActivity&semi;<br &sol;>import com&period;adcolony&period;sdk&period;&ast;&semi;<br &sol;>import android&period;os&period;Bundle&semi;<br &sol;>import android&period;view&period;View&semi;<br &sol;>import android&period;widget&period;LinearLayout&semi;<br &sol;>import android&period;widget&period;Toast&semi;<br &sol;><br &sol;>public class MainActivity extends AppCompatActivity &lbrace;<br &sol;><br &sol;> private final static String APP&lowbar;ID &equals; "ENTER&lowbar;YOUR&lowbar;APP&lowbar;ID"&semi;<br &sol;> private final static String BANNER&lowbar;ZONE&lowbar;ID &equals; "ENTER&lowbar;YOUR&lowbar;BANNER&lowbar;ZONE&lowbar;ID"&semi;<br &sol;> private final static String INTERSTITIAL&lowbar;ZONE&lowbar;ID &equals; "ENTER&lowbar;YOUR&lowbar;INTERSTITIAL&lowbar;ZONE&lowbar;ID"&semi;<br &sol;> private final static String REWARD&lowbar;ZONE&lowbar;ID &equals; "ENTER&lowbar;YOUR&lowbar;REWARD&lowbar;ZONE&lowbar;ID"&semi;<br &sol;> public final static String&lbrack;&rsqb; AD&lowbar;UNIT&lowbar;Zone&lowbar;Ids &equals; new String&lbrack;&rsqb;&lbrace;BANNER&lowbar;ZONE&lowbar;ID&comma; INTERSTITIAL&lowbar;ZONE&lowbar;ID&comma; REWARD&lowbar;ZONE&lowbar;ID&rcub;&semi;<br &sol;><br &sol;> private LinearLayout bannerContainer&semi;<br &sol;> private AdColonyAdView bannerAdColony&semi;<br &sol;><br &sol;> private AdColonyInterstitial interstitialAdColony&semi;<br &sol;> private AdColonyInterstitialListener interstitialListener&semi;<br &sol;> private AdColonyAdOptions interstitialAdOptions&semi;<br &sol;><br &sol;> private AdColonyInterstitial rewardAdColony&semi;<br &sol;> private AdColonyInterstitialListener rewardListener&semi;<br &sol;> private AdColonyAdOptions rewardAdOptions&semi;<br &sol;><br &sol;> private static boolean isInterstitialLoaded&semi;<br &sol;> private static boolean isRewardLoaded&semi;<br &sol;><br &sol;><br &sol;> &commat;Override<br &sol;> protected void onCreate&lpar;Bundle savedInstanceState&rpar; &lbrace;<br &sol;> super&period;onCreate&lpar;savedInstanceState&rpar;&semi;<br &sol;> setContentView&lpar;R&period;layout&period;activity&lowbar;main&rpar;&semi;<br &sol;><br &sol;> initColonySdk&lpar;&rpar;&semi;<br &sol;> initBannerAd&lpar;&rpar;&semi;<br &sol;> initInterstitialAd&lpar;&rpar;&semi;<br &sol;> initRewardedAd&lpar;&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> private void initColonySdk&lpar;&rpar; &lbrace;<br &sol;> <span style&equals;"color&colon; &num;008000&semi;"><strong>&sol;&sol; Construct optional app options object to be sent with configure<&sol;strong><&sol;span><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol; setKeepScreenOn&colon; set a flag on our Activity's window to keep the display from going to sleep&period;<&sol;strong><&sol;span><br &sol;> AdColonyAppOptions appOptions &equals; new AdColonyAppOptions&lpar;&rpar;&period;setKeepScreenOn&lpar;true&rpar;&semi;<br &sol;><br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Configure AdColony in your launching Activity's onCreate&lpar;&rpar; method so that cached ads can<&sol;span><&sol;strong><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; be available as soon as possible&period;<&sol;span><&sol;strong><br &sol;> AdColony&period;configure&lpar;getApplication&lpar;&rpar;&comma; appOptions&comma; APP&lowbar;ID&comma; AD&lowbar;UNIT&lowbar;Zone&lowbar;Ids&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> private void initBannerAd&lpar;&rpar; &lbrace;<br &sol;> bannerContainer &equals; &lpar;LinearLayout&rpar; findViewById&lpar;R&period;id&period;colony&rpar;&semi;<br &sol;><br &sol;> AdColonyAdViewListener bannerListener &equals; new AdColonyAdViewListener&lpar;&rpar; &lbrace;<br &sol;><br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when an ad request is filled<&sol;span><&sol;strong><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; or when an ad finishes loading&period;<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onRequestFilled&lpar;AdColonyAdView adColonyAdView&rpar; &lbrace;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol;Remove previous ad view if present&period;<&sol;span><&sol;strong><br &sol;> if &lpar;bannerContainer&period;getChildCount&lpar;&rpar; &gt&semi; 0&rpar; &lbrace;<br &sol;> bannerContainer&period;removeView&lpar;bannerAdColony&rpar;&semi;<br &sol;> &rcub;<br &sol;> bannerContainer&period;addView&lpar;adColonyAdView&rpar;&semi;<br &sol;> bannerAdColony &equals; adColonyAdView&semi;<br &sol;> &rcub;<br &sol;><br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;">&sol;&sol; Code to be executed when an ad request is not filled<&sol;span><&sol;strong><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol;or when an ad is not loaded&period;<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onRequestNotFilled&lpar;AdColonyZone zone&rpar; &lbrace;<br &sol;> super&period;onRequestNotFilled&lpar;zone&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol;Code to be executed when an ad opens<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onOpened&lpar;AdColonyAdView ad&rpar; &lbrace;<br &sol;> super&period;onOpened&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> <span style&equals;"color&colon; &num;008000&semi;"><strong>&sol;&sol;Code to be executed when user closed an ad<&sol;strong><&sol;span><br &sol;> &commat;Override<br &sol;> public void onClosed&lpar;AdColonyAdView ad&rpar; &lbrace;<br &sol;> super&period;onClosed&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when the user clicks on an ad&period;<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onClicked&lpar;AdColonyAdView ad&rpar; &lbrace;<br &sol;> super&period;onClicked&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; called after onAdOpened&lpar;&rpar;&comma; when a user click opens another app<&sol;span><&sol;strong><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; &lpar;such as the Google Play&rpar;&comma; backgrounding the current app<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onLeftApplication&lpar;AdColonyAdView ad&rpar; &lbrace;<br &sol;> super&period;onLeftApplication&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;> &rcub;&semi;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Optional Ad specific options to be sent with request<&sol;span><&sol;strong><br &sol;> AdColonyAdOptions adOptions &equals; new AdColonyAdOptions&lpar;&rpar;&semi;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol;Request Ad<&sol;span><&sol;strong><br &sol;> AdColony&period;requestAdView&lpar;BANNER&lowbar;ZONE&lowbar;ID&comma; bannerListener&comma; AdColonyAdSize&period;BANNER&comma; adOptions&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> private void initInterstitialAd&lpar;&rpar; &lbrace;<br &sol;><br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;">&sol;&sol; Set up listener for interstitial ad callbacks&period;<&sol;span><&sol;strong><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Implement only the needed callbacks&period;<&sol;span><&sol;strong><br &sol;> interstitialListener &equals; new AdColonyInterstitialListener&lpar;&rpar; &lbrace;<br &sol;><br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when an ad request is filled&period;<&sol;span><&sol;strong><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; get AdColonyInterstitial object from adcolony Ad Server&period;<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onRequestFilled&lpar;AdColonyInterstitial adIn&rpar; &lbrace;<br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol; Ad passed back in request filled callback&comma; ad can now be shown<&sol;strong><&sol;span><br &sol;> interstitialAdColony &equals; adIn&semi;<br &sol;> isInterstitialLoaded &equals; true&semi;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when an ad request is not filled<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onRequestNotFilled&lpar;AdColonyZone zone&rpar; &lbrace;<br &sol;> super&period;onRequestNotFilled&lpar;zone&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol;Code to be executed when an ad opens<&sol;strong><&sol;span><br &sol;> &commat;Override<br &sol;> public void onOpened&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onOpened&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;">&sol;&sol;Code to be executed when user closed an ad<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onClosed&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onClosed&lpar;ad&rpar;&semi;<br &sol;> Toast&period;makeText&lpar;getApplicationContext&lpar;&rpar;&comma; "Ad is closed&excl;"&comma; Toast&period;LENGTH&lowbar;SHORT&rpar;&period;show&lpar;&rpar;&semi;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol;request new Interstitial Ad on close<&sol;span><&sol;strong><br &sol;> AdColony&period;requestInterstitial&lpar;INTERSTITIAL&lowbar;ZONE&lowbar;ID&comma; interstitialListener&comma; interstitialAdOptions&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when the user clicks on an ad&period;<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onClicked&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onClicked&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;">&sol;&sol; called after onAdOpened&lpar;&rpar;&comma; when a user click opens another app<&sol;span><&sol;strong><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; &lpar;such as the Google Play&rpar;&comma; backgrounding the current app<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onLeftApplication&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onLeftApplication&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when an ad expires&period;<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onExpiring&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onExpiring&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;> &rcub;&semi;<br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Optional Ad specific options to be sent with request<&sol;span><&sol;strong><br &sol;> interstitialAdOptions &equals; new AdColonyAdOptions&lpar;&rpar;&semi;<br &sol;> AdColony&period;requestInterstitial&lpar;INTERSTITIAL&lowbar;ZONE&lowbar;ID&comma; interstitialListener&comma; interstitialAdOptions&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> private void initRewardedAd&lpar;&rpar; &lbrace;<br &sol;><br &sol;><span style&equals;"color&colon; &num;008000&semi;"><strong> &sol;&sol;setRewardListener&colon;set the AdColonyRewardListener for global reward callbacks for the app&period;<&sol;strong><&sol;span><br &sol;> AdColony&period;setRewardListener&lpar;new AdColonyRewardListener&lpar;&rpar; &lbrace;<br &sol;><br &sol;> &commat;Override<br &sol;> public void onReward&lpar;AdColonyReward reward&rpar; &lbrace;<br &sol;><br &sol;> if &lpar;reward&period;success&lpar;&rpar;&rpar; &lbrace;<br &sol;> Toast&period;makeText&lpar;getApplicationContext&lpar;&rpar;&comma; "Reward Earned"&comma; Toast&period;LENGTH&lowbar;SHORT&rpar;&period;show&lpar;&rpar;&semi;<br &sol;> &rcub; else &lbrace;<br &sol;> Toast&period;makeText&lpar;getApplicationContext&lpar;&rpar;&comma; "Reward Cancelled"&comma; Toast&period;LENGTH&lowbar;SHORT&rpar;&period;show&lpar;&rpar;&semi;<br &sol;> &rcub;<br &sol;> &rcub;<br &sol;> &rcub;&rpar;&semi;<br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;">&sol;&sol; Set up listener for interstitial ad callbacks&period; <&sol;span><&sol;strong><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Implement only the needed callbacks&period;<&sol;span><&sol;strong><br &sol;> rewardListener &equals; new AdColonyInterstitialListener&lpar;&rpar; &lbrace;<br &sol;><br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when an ad request is filled<&sol;span><&sol;strong><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; get AdColonyInterstitial Reward object from adcolony Ad Server<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onRequestFilled&lpar;AdColonyInterstitial adReward&rpar; &lbrace;<br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Ad passed back in request filled callback&comma; ad can now be shown<&sol;span><&sol;strong><br &sol;> rewardAdColony &equals; adReward&semi;<br &sol;> isRewardLoaded &equals; true&semi;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when an ad request is not filled<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onRequestNotFilled&lpar;AdColonyZone zone&rpar; &lbrace;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol;Code to be executed when an ad opens<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onOpened&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onOpened&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol;Code to be executed when user closed an ad<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onClosed&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onClosed&lpar;ad&rpar;&semi;<br &sol;> Toast&period;makeText&lpar;getApplicationContext&lpar;&rpar;&comma; "Ad is closed&excl;"&comma; Toast&period;LENGTH&lowbar;SHORT&rpar;&period;show&lpar;&rpar;&semi;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol;request new reward on close<&sol;span><&sol;strong><br &sol;> AdColony&period;requestInterstitial&lpar;REWARD&lowbar;ZONE&lowbar;ID&comma; rewardListener&comma; rewardAdOptions&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when the user clicks on an ad&period;<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onClicked&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onClicked&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> <strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; called after onAdOpened&lpar;&rpar;&comma; when a user click opens another app<&sol;span><&sol;strong><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; &lpar;such as the Google Play&rpar;&comma; backgrounding the current app<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onLeftApplication&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onLeftApplication&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Code to be executed when an ad expires&period;<&sol;span><&sol;strong><br &sol;> &commat;Override<br &sol;> public void onExpiring&lpar;AdColonyInterstitial ad&rpar; &lbrace;<br &sol;> super&period;onExpiring&lpar;ad&rpar;&semi;<br &sol;> &rcub;<br &sol;> &rcub;&semi;<br &sol;><strong><span style&equals;"color&colon; &num;008000&semi;"> &sol;&sol; Ad specific options to be sent with request<&sol;span><&sol;strong><br &sol;> rewardAdOptions &equals; new AdColonyAdOptions&lpar;&rpar;<br &sol;> &period;enableConfirmationDialog&lpar;false&rpar;<br &sol;> &period;enableResultsDialog&lpar;false&rpar;&semi;<br &sol;> AdColony&period;requestInterstitial&lpar;REWARD&lowbar;ZONE&lowbar;ID&comma; rewardListener&comma; rewardAdOptions&rpar;&semi;<br &sol;> &rcub;<br &sol;><br &sol;> public void showInterstitialAd&lpar;View view&rpar; &lbrace;<br &sol;> if &lpar;interstitialAdColony &excl;&equals; null &amp&semi;&amp&semi; isInterstitialLoaded&rpar; &lbrace;<br &sol;> interstitialAdColony&period;show&lpar;&rpar;&semi;<br &sol;> isInterstitialLoaded &equals; false&semi;<br &sol;> &rcub; else &lbrace;<br &sol;> Toast&period;makeText&lpar;getApplicationContext&lpar;&rpar;&comma; "Interstitial Ad Is Not Loaded Yet or Request Not Filled"&comma; Toast&period;LENGTH&lowbar;SHORT&rpar;&period;show&lpar;&rpar;&semi;<br &sol;> &rcub;<br &sol;> &rcub;<br &sol;><br &sol;> public void showRewardVideoAd&lpar;View view&rpar; &lbrace;<br &sol;> if &lpar;rewardAdColony &excl;&equals; null &amp&semi;&amp&semi; isRewardLoaded&rpar; &lbrace;<br &sol;> rewardAdColony&period;show&lpar;&rpar;&semi;<br &sol;> isRewardLoaded &equals; false&semi;<br &sol;> &rcub; else &lbrace;<br &sol;> Toast&period;makeText&lpar;getApplicationContext&lpar;&rpar;&comma; "Reward Ad Is Not Loaded Yet or Request Not Filled"&comma; Toast&period;LENGTH&lowbar;SHORT&rpar;&period;show&lpar;&rpar;&semi;<br &sol;> &rcub;<br &sol;> &rcub;<br &sol;>&rcub;<&sol;pre> &NewLine;<h4><span style&equals;"color&colon; &num;000080&semi;">Step 4&colon; Run and test your app<&sol;span><&sol;h4> &NewLine;<p>When you run your app it will look like this&colon;<&sol;p> &NewLine;<p><img class&equals;"alignnone wp-image-2875" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;Screenshot&lowbar;20211020-132419&lowbar;AdColonyDemo-498x1024&period;jpg" alt&equals;"" width&equals;"289" height&equals;"595" &sol;>       <span style&equals;"font-size&colon; 16px&semi;">  <&sol;span><img class&equals;"alignnone wp-image-2877" style&equals;"font-style&colon; inherit&semi; font-weight&colon; inherit&semi;" src&equals;"https&colon;&sol;&sol;c1ctech&period;com&sol;wp-content&sol;uploads&sol;2021&sol;10&sol;Screenshot&lowbar;20211020-132459&lowbar;AdColonyDemo-498x1024&period;jpg" alt&equals;"" width&equals;"291" height&equals;"599" &sol;><&sol;p> &NewLine;<p>&nbsp&semi;<&sol;p> &NewLine;&NewLine;

Exit mobile version