<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Berke Coban on Medium]]></title>
        <description><![CDATA[Stories by Berke Coban on Medium]]></description>
        <link>https://medium.com/@berke.cobann?source=rss-682f622a5f36------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*eVnbmMII76YV4XmoKKMCyA.jpeg</url>
            <title>Stories by Berke Coban on Medium</title>
            <link>https://medium.com/@berke.cobann?source=rss-682f622a5f36------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 03:47:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@berke.cobann/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[‍How to show Huawei Ads with Smartadserver Mediation?]]></title>
            <link>https://medium.com/huawei-developers/how-to-show-huawei-ads-with-smartadserver-mediation-59b69f711426?source=rss-682f622a5f36------2</link>
            <guid isPermaLink="false">https://medium.com/p/59b69f711426</guid>
            <category><![CDATA[banner-ads]]></category>
            <category><![CDATA[waterfall-model]]></category>
            <category><![CDATA[mediation]]></category>
            <category><![CDATA[smartads]]></category>
            <category><![CDATA[huawei-ads]]></category>
            <dc:creator><![CDATA[Berke Coban]]></dc:creator>
            <pubDate>Thu, 17 Mar 2022 09:37:20 GMT</pubDate>
            <atom:updated>2022-03-17T09:49:31.733Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*GCGHWE__LdfbXssvvMVyNg.png" /></figure><p>In this article, we will talk about showing Huawei ads with Smartadserver’s Display SDK (Android) through mediation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*UZeReLUgC4f9UVkvWqAguQ.jpeg" /></figure><p>Supported ad types are banner, interstitial, rewarded, and native ads.</p><h3>What is ad mediation?</h3><p>Ad Mediation gives multiple ad networks access to your ad inventory, and gets them to compete against each other for ad slots. This process increases competition among advertisers and in return, increases your ad revenue. The mediation platform checks what CPM all the various ad networks are offering and looks for the highest one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*n6raql8M5hetDDCCzgOuuQ.jpeg" /><figcaption>Structure of Waterfall (method for ad buying)</figcaption></figure><h3>Getting Started</h3><h4>Creating a Huawei Ad unit</h4><p>First things first, We need to create our ad units in Huawei Ads Publisher Console. Check <a href="https://developer.huawei.com/consumer/en/monetize/">this</a> link to start.</p><p><a href="https://sanghati.medium.com/how-to-create-huawei-ads-kit-slot-id-e9666087f30b">This</a> medium post also might help you for getting a Huawei Ad slot id.</p><h4>Smartadserver Publisher Console</h4><p>We created our Huawei ad slots. Our next step will be enabling mediation from the Smartadserver console. Let’s get started.</p><p>🔹<strong>Log-in to the smartadserver console.</strong></p><ul><li>Click <a href="https://manage.smartadserver.com/">here</a> to log in to the console.</li></ul><p>🔹<strong> Create a site and a page for the mediation.</strong></p><p>This part can be skipped if you have already have a site ID and Page ID available for use.</p><p>Site ID and Page ID are mandatory for making ad request with Display SDK.</p><p>Go to “<strong>Inventory -&gt; Sites &amp; Pages</strong>” and create a site and a page for your Huawei mediation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gpRxIqKEYCgv-46dlWhaJQ.png" /><figcaption>Sites&amp;pages</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4SD7UCpU6QI3Ko1pD8PSxg.png" /><figcaption>Creating site</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*r_RgIzyRgOXooVMYsKJJXg.png" /><figcaption>Creating page</figcaption></figure><p>🔹<strong> Create Ad Format ID</strong></p><p>Go to “<strong>Inventory -&gt; Formats</strong>” and create an Ad unit for your Ad type (put 0x0 for the size and note your Format ID).</p><p>Note your format ID, We will use our Site,page, and format ID to make an ad request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wJhPP7LNqA22bLmfre4x1Q.png" /><figcaption>Creating ad format</figcaption></figure><p>🔹 <strong>Create a Mediation Campaign</strong></p><ul><li>Go to “<strong>Campaigns -&gt; Campaign List</strong>” and create a new campaign,</li><li>Select mediation on the pop-up, give your campaign a name and an expiration date)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mwuc0lcuASIB8swbndR44Q.png" /><figcaption>Creating mediation campaign for Huawei Ads</figcaption></figure><p>🔹<strong> Create a New Insertion</strong></p><p>Select “<strong>New Insertion</strong>” inside your created campaign. Each insertion represents one Huawei ad slot. For example, if you want to use one banner and one rewarded slot, you need to create 2 insertions.</p><ul><li>Switch to <strong>classical mode UI</strong> from the left side of the web page, give your insertion a name, select “Mobile” as category, select “<strong>AdNetwork / Mediation</strong>” as channel and select “<strong>Pay Ads</strong>” for the type. Select other fields according to your needs and click “<strong>Save and Go to Next Step</strong>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*r-vQJ_AQ8DXRHIJT3wao1A.png" /><figcaption>configure ad insertion-1</figcaption></figure><ul><li>On the “<strong>Placement tab</strong>”, select your ad format, and select the site and page that are created on step-2. Click “<strong>Save and Go to Next Step</strong>”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*niRJgy8DtSdYi5JX-8jDyQ.png" /><figcaption>configure ad insertion-2</figcaption></figure><ul><li>On the “<strong>Creatives tab</strong>”, click “<strong>Template Library</strong>”, on Offical Templates select “<strong>In-App Mediation Custom Adapter</strong>”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Of-b1RtFvK-y6rRBSjXa6g.png" /><figcaption>configure ad insertion-3</figcaption></figure><ul><li>A section will be seen named “<strong>Predefined template</strong>”. Give it a name, and select the ad format type (Banner,Rewarded, etc.)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NSAKRzplUBgERBUgDuM0yQ.png" /><figcaption>custom data example for banner ads</figcaption></figure><p>For the “<strong>Adapter Class</strong>” and “<strong>Placement info</strong>” check the table below :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6a02990308fc108f91cdb8691b1c62e4/href">https://medium.com/media/6a02990308fc108f91cdb8691b1c62e4/href</a></iframe><p><strong>Note:</strong> For the <strong>Placement info</strong> section you need to write only the Huawei ad unit id with no spaces. (except banner ads)</p><p>For the banner ads, you need to write 3 things. Your Huawei ad unit id, banner width, and banner height.</p><p>for 320x50 banner test ad write the following with no spaces :</p><pre><strong>testw6vs28auh,320,50</strong></pre><p><strong>Banner Sizes :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*paBqlkEKYEZOICOiiJ1maA.png" /><figcaption>banner sizes for Huawei Ads</figcaption></figure><p><strong>Note:</strong> Only BANNER_SIZE_360_57 and BANNER_SIZE_360_144 are supported in the Chinese mainland.</p><h3>Android Studio Preparations</h3><h4>Adding Smartadserver Display SDK</h4><p>Smartadserver Display SDK requires Android Studio version 3.0 or higher, and minimum API level 19. Check the link below to integrate Display SDK into your android application.</p><p><a href="https://documentation.smartadserver.com/displaySDK/android/gettingstarted.html">Getting started on Android</a></p><h4>Adding Huawei Ads Repo</h4><p>🔹 In the project-level build.gradle, include Huawei’s Maven repository and jitpack io.</p><pre>repositories {<br>    maven { url &#39;https://developer.huawei.com/repo/&#39; } <br>    maven {url &quot;https://jitpack.io&quot;} <br>}<br><br>...<br><br>allprojects {<br>    repositories {<br>        maven { url &#39;https://developer.huawei.com/repo/&#39; }<br>        maven {url &quot;https://jitpack.io&quot;}<br>    }<br>}</pre><p>🔹 In the app-level build.gradle, include Huawei Ads mediation adapter library and Huawei support library of smartadserver (needed for personalized ads).</p><pre>dependencies {</pre><pre><strong> implementation</strong> &#39;com.github.Explore-In-HMS:huawei.ads.smartadsserver_mediation:v1.0.0&#39;<br>   <br> <strong>implementation</strong> &#39;com.smartadserver.android:smart-core-sdk-huawei-support:1.0.0&#39;<br>}</pre><p>⛔ To allow HTTP and HTTPS network requests on devices with targetSdkVersion 28 or later, configure the following information in the AndroidManifest.xml file (not adding it effects rewarded ads)</p><pre>&lt;application<br>    ...<br>    android:usesCleartextTraffic=&quot;true&quot;<br>    &gt;<br>    ...<br>&lt;/application&gt;</pre><h3>Demo project with Banner ad mediation (Kotlin)</h3><p>We enabled Huawei mediation from the console and made all the preparations in Android Studio now let’s start coding. 😊</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*Q41O8bncbNc2VeIoUftzyA.gif" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f9fc488511f8fad635c024ae1e7357df/href">https://medium.com/media/f9fc488511f8fad635c024ae1e7357df/href</a></iframe><p>Our XML layout will be like this. You can change the height of the ‘SASBannerView’ according to your Banner size. Let’s look at the Kotlin code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/74c1cf70b42ad5aeb9101ea2b3ac68fd/href">https://medium.com/media/74c1cf70b42ad5aeb9101ea2b3ac68fd/href</a></iframe><p>This is our simple banner activity code. On line 20, replace fields with the site, page, and format id that you have created.</p><h3>Conclusion</h3><p>Now you have successfully learned how to show Huawei ads with smart’s display SDK. You can check our Github repository for more details.</p><p>Take care until next time :)</p><p><a href="https://github.com/Explore-In-HMS/huawei.ads.smartadsserver_mediation">GitHub - Explore-In-HMS/huawei.ads.smartadsserver_mediation</a></p><h3>References</h3><ul><li><a href="https://documentation.smartadserver.com/displaySDK/">Display SDK</a></li><li><a href="https://documentation.smartadserver.com/displaySDK/mediation/primarysdk/integratenewsdk.html">Integrating a new ad network SDK</a></li><li><a href="https://documentation.smartadserver.com/displaySDK/android/gettingstarted.html">Getting started on Android</a></li><li><a href="https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/publisher-service-dev-process-0000001050064964">Document</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59b69f711426" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/how-to-show-huawei-ads-with-smartadserver-mediation-59b69f711426">👨🏼‍💻How to show Huawei Ads with Smartadserver Mediation?</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use Huawei Roll Ads with ExoPlayer?]]></title>
            <link>https://medium.com/huawei-developers/how-to-use-huawei-roll-ads-with-exoplayer-34ecbe8a5b86?source=rss-682f622a5f36------2</link>
            <guid isPermaLink="false">https://medium.com/p/34ecbe8a5b86</guid>
            <category><![CDATA[exoplayer]]></category>
            <category><![CDATA[video-ads]]></category>
            <category><![CDATA[hms-ads-kit]]></category>
            <category><![CDATA[video-ads-traffic]]></category>
            <category><![CDATA[exoplayer2]]></category>
            <dc:creator><![CDATA[Berke Coban]]></dc:creator>
            <pubDate>Mon, 29 Nov 2021 10:38:54 GMT</pubDate>
            <atom:updated>2021-11-29T10:38:54.232Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*GCGHWE__LdfbXssvvMVyNg.png" /></figure><h3>Introduction</h3><p>Hello everyone,</p><p>Today I will talk about using Huawei Roll Ads with Exoplayer in Android projects.</p><p>With this solution, you will be able to show video ads on your video player easily.</p><h4>What is Exoplayer?</h4><p>Exoplayer is an extensible media player for Android developed by Google.</p><p>Check the below link for more details about Exoplayer :</p><p><a href="https://exoplayer.dev/">ExoPlayer</a></p><p>Check the below link for the Github page of Exoplayer :</p><p><a href="https://github.com/google/ExoPlayer">GitHub - google/ExoPlayer: An extensible media player for Android</a></p><h4>What is Roll Ads?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zUxj1PL3ek8pE_S78iqJmQ.png" /></figure><p>Roll ads are displayed as short videos or images, before, during, or after the video content is played.</p><p>Check the below link for more details about Huawei Roll Ads:</p><p><a href="https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/publisher-service-instream-0000001058253743">Document</a></p><h3>Preparations Before Coding</h3><p>Before the development, two things must be done :</p><h4>1-) Creating an ad unit ID in Huawei Publisher Console</h4><p>Click <a href="https://developer.huawei.com/consumer/en/monetize/">here </a>to enter Huawei Publisher Console. After that create an ad unit with Roll ad type.</p><p>If you are new to Huawei Ecosystem don’t have an account check the medium post below :</p><p><a href="https://sanghati.medium.com/how-to-create-huawei-ads-kit-slot-id-e9666087f30b">How to create Huawei Ads Kit Slot Id ?</a></p><h4>2-) Exoplayer development</h4><p>Before using the solution you need to complete the exoplayer development.</p><p>If you are new to exoplayer, you can check the example code here :</p><p><a href="https://github.com/googleads/googleads-ima-android/tree/master/BasicExample">googleads-ima-android/BasicExample at master · googleads/googleads-ima-android</a></p><p>I will also share exoplayer codes in the section “Demo Application”.</p><h3>Before Start</h3><h4>Software Requirements :</h4><ul><li>Android Studio</li><li>JDK 1.7 or later</li><li>minSdkVersion: 19</li><li>Gradle version: 4.1 or later</li></ul><h4>Integrate The Huawei Roll Ads Adapter</h4><p>In your project-level build.gradle, include Huawei’s Maven repository.</p><pre>buildscript <strong>{<br>    </strong>repositories <strong>{<br>        </strong>google()<br>        maven { url &#39;https://jitpack.io&#39; }<br>        mavenCentral()<br>        maven <strong>{ </strong>url &#39;https://developer.huawei.com/repo/&#39; <strong>}</strong></pre><pre><strong>}<br></strong>allprojects <strong>{<br>    </strong>repositories <strong>{<br>        </strong>google()<br>        maven { url &#39;https://jitpack.io&#39; }<br>        mavenCentral()<br>        maven <strong>{ </strong>url &#39;https://developer.huawei.com/repo/&#39; <strong>}<br>    }<br>}</strong></pre><p><em>In the app-level build.gradle, include adapter, exoplayer, and multidex dependencies.</em></p><pre>implementation<br>&#39;com.github.Explore-In-HMS:huawei.ads.exoplayer_adapter:v1.0.0&#39;</pre><pre>implementation &#39;com.google.android.exoplayer:exoplayer:2.15.0&#39;<br>implementation &#39;androidx.multidex:multidex:2.0.1&#39;<br>implementation &#39;com.huawei.hms:ads:3.4.49.301&#39;</pre><pre><br>defaultConfig {<br>    applicationId &quot;com.hms.exoplayerrolladsplugin&quot;<br>    minSdkVersion 19<br>    targetSdkVersion 30<br>    versionCode 1<br>    versionName &quot;1.0&quot;<br>    <strong>multiDexEnabled <em>true   // enable multidex for the project</em></strong><br>}</pre><h3>Demo Application</h3><p>Finally, we are ready to code. Let&#39;s start with our layout.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6b8b0ac436979efbe74beae9bac1558b/href">https://medium.com/media/6b8b0ac436979efbe74beae9bac1558b/href</a></iframe><p>Create a layout that contains an exoplayer.</p><p>I created the player with 200dp it can be created with different sizes, but I recommend using it between 200dp and 400dp.</p><p>The UI will be seen better between these sizes.</p><p><strong>Important Note: </strong>Do not use margin on Playerview, because the library inserts the ads onto this view.</p><p>If you need to use margin for the player view, wrap it in Linear Layout, etc., and give margin value to the layout not the player view directly.</p><p>Let&#39;s continue with our main activity code and the adapter implementation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/48e3d28c47696b073f130a8aafd93019/href">https://medium.com/media/48e3d28c47696b073f130a8aafd93019/href</a></iframe><p>The demo code for our solution is like above.</p><p>First, we created our Exoplayer and put content inside it. On line 35, you can see the adapter initialization. Let&#39;s see how the adapter works.</p><p><strong>1-) Constructor Parameters</strong></p><p>When creating the builder you must give 3 parameters. Context, player view instance, and your Roll ad unit id.</p><p><strong>2-) Set Ad item method</strong></p><p>This method is used to specify the video ads according to the placement and skippable value.</p><p><strong>Placement</strong></p><p>For the placement, There are 5 placements you can choose (Preroll, FirstQuartile, Middle, ThidQuartile, and Post-roll).</p><p>The order is not important. according to these placements, the ad will pop up in the video content</p><p>For example, you create 2 Ad items, their placements are middle and post-roll. In the middle and at the end of your video content, ads will be shown.</p><p><strong>Note: </strong>Only one ad will be shown for each placement. <a href="https://unruly.co/blog/article/2021/02/03/what-are-ad-pods-and-how-do-they-help-publishers-and-advertisers/">Ad pods</a> are not supported currently.</p><p><strong>Skippable value</strong></p><p>Used to decide if the ad is skippable or not. Give true value for skippable ads.</p><p><strong>3-) Optional methods</strong></p><p>The methods between lines 43 and 52, used to specify your ad request to target your users better.</p><p>I explained them in the code above.</p><h4>Output</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KkKLOqOPvWX8rQHXTK38jQ.gif" /></figure><h3>Summary</h3><p>Now you learned how to implement roll ads with exoplayer easily. You can use this Video ad solution to monetize easily with Huawei Ads.</p><p>Thank you for your time :)</p><h4>References</h4><ul><li><a href="https://github.com/Explore-In-HMS/huawei.ads.exoplayer_adapter">GitHub - Explore-In-HMS/huawei.ads.exoplayer_adapter: Show Huawei Roll Ads with Exoplayer</a></li><li><a href="https://exoplayer.dev/">ExoPlayer</a></li><li><a href="https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/publisher-service-instream-0000001058253743">Document</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34ecbe8a5b86" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/how-to-use-huawei-roll-ads-with-exoplayer-34ecbe8a5b86">How to Use Huawei Roll Ads with ExoPlayer?</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HUAWEI Roll Ads Nasıl Kullanılır?]]></title>
            <link>https://medium.com/huawei-developers-tr/huawei-roll-ads-nas%C4%B1l-kullan%C4%B1l%C4%B1r-910cb7b5ac6c?source=rss-682f622a5f36------2</link>
            <guid isPermaLink="false">https://medium.com/p/910cb7b5ac6c</guid>
            <category><![CDATA[hms]]></category>
            <category><![CDATA[ads]]></category>
            <category><![CDATA[hms-core]]></category>
            <category><![CDATA[huawei-ads]]></category>
            <category><![CDATA[mobile-ads]]></category>
            <dc:creator><![CDATA[Berke Coban]]></dc:creator>
            <pubDate>Fri, 06 Aug 2021 13:49:27 GMT</pubDate>
            <atom:updated>2021-08-06T13:49:27.605Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*tducSMLAldbkqRO7.png" /></figure><p>Bu yazımda HUAWEI roll ads ve native android uygulamalarda nasıl kullanabileceğimizden bahsedeceğim.</p><h3>Roll Ads nedir?</h3><p>Roll ads kısa video yada resimlerden oluşan reklamlardır. Video içeriklerinin gösterimi sırasında kullanılır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uQDrYdi1_imGTzM0.png" /></figure><h4>Roll Ads hakkında faydalı linkler</h4><p>Roll Ads hakkındaki detayları <a href="https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/publisher-service-instream-0000001058253743">bu</a> linkten inceleyebilirsiniz.</p><p>Java ile yazılmış bütün reklam tipleri için örnek koda ulaşabileceğiniz Github sayfasını da <a href="https://github.com/HMS-Core/hms-ads-demo-java">bu</a> linkten inceleyebilirsiniz (InstreamActivity adındaki sınıf Roll ads örneği)</p><h3>Kodlamadan önce yapılacak hazırlıklar</h3><h4>Reklam birimi oluşturma</h4><p>HUAWEI reklamlarını uygulamanızda gösterebilmek için ‘HUAWEI Ads Publisher Service’ üzerinden reklam birimi oluşturmanız gerekmektedir.Gerekli detaylara aşağıdaki medium makalesinden ulaşabilirsiniz.</p><p><a href="https://sanghati.medium.com/how-to-create-huawei-ads-kit-slot-id-e9666087f30b">How to create Huawei Ads Kit Slot Id ?</a></p><h3>Uygulamanızda yapmanız gereken hazırlıklar</h3><h4>Gereksinimler</h4><ul><li>Android Studio</li><li>JDK 1.7 ve sonrası</li><li>minSdkVersion: 19</li><li>Gradle versiyonu: 4.1 ve sonrası</li><li>HMS Core (APK) 5.0.3.300 ve sonrası</li></ul><h4>HUAWEI Ads SDK’yı Entegre Etmek</h4><p>project-level build. gradle’a HUAWEI reposunu eklemekle başlayalım.</p><pre>buildscript <strong>{<br>    </strong>repositories <strong>{<br>        </strong>google()<br>        jcenter()<br>        maven <strong>{ </strong>url &#39;https://developer.huawei.com/repo/&#39; <strong>}<br>    }</strong>allprojects <strong>{<br>    </strong>repositories <strong>{<br>        </strong>google()<br>        jcenter()<br>        maven <strong>{ </strong>url &#39;https://developer.huawei.com/repo/&#39; <strong>}<br>    }<br>}</strong></pre><p>app-level build. gradle’a ise HUAWEI Ads’i ekliyoruz.</p><pre>implementation &#39;com.huawei.hms:ads-lite:13.4.40.302&#39;</pre><h3>Demo Uygulama-Roll Ads</h3><p>XML layoutumuz ile başlayalım. Bu örnek projede Android VideoView kullanacağız. Video oynadıktan belli bir süre sonra ise reklamımız tetiklenecek.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/056287c794f5be97e5612f0df93ac8c5/href">https://medium.com/media/056287c794f5be97e5612f0df93ac8c5/href</a></iframe><p>Layoutumuzda 2 tane Relative layout bulunuyor. Birincisi VideoView yani videonun oynatılacağı kısım. 2. kısım ise (instream_ad_container) şuanlık gizlenmiş olup reklam tetiklendiğinde görünür olacak. İçerisinde reklam ile alakalı butonlar,reklamın kalan süresini gösteren Textview gibi elemanlar bulunuyor. Görüntüsü şu şekilde;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*2kpuPrCqD_aZjBBIIdHbmg.png" /></figure><p>Şimdi Java kodumuzla devam edelim.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/36e378a4952a324d93979261c12f48e1/href">https://medium.com/media/36e378a4952a324d93979261c12f48e1/href</a></iframe><p>‘startCountDown()’ metodu ile 5 saniye sonra reklamın tetiklenmesini sağlıyoruz. Burda ihtiyacınıza göre farklı bir algoritmada kullanılabilir.</p><p>Daha sonra ‘currentTime’ değişkenini reklamın tetiklendiği saniyeye güncelleyerek, VideoView’ın ‘seekTo()’ metodu yardımıyla reklamdan sonra videomuzun kaldığı yerden devam etmesini sağlıyoruz.</p><p><strong>Not:</strong> HUAWEI publisher console üzerinden oluşturduğunuz ad unit numaranızı ‘configAdLoader()’ methodunda yazmayı unutmayın.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*clO89YQqvwyaq5wiYPlKnA.gif" /></figure><p>Bir sonraki yazımda görüşmek üzere..</p><h3>Referanslar</h3><ul><li><a href="https://developer.huawei.com/consumer/en/doc/HMS-Plugin-Guides/roll-0000001073972145-V1">Document</a></li><li><a href="https://github.com/HMS-Core/hms-ads-demo-java/blob/master/app/src/main/java/com/huawei/hms/ads/sdk/InstreamActivity.java">hms-ads-demo-java/InstreamActivity.java at master · HMS-Core/hms-ads-demo-java</a></li><li><a href="https://sanghati.medium.com/how-to-create-huawei-ads-kit-slot-id-e9666087f30b">How to create Huawei Ads Kit Slot Id ?</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=910cb7b5ac6c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers-tr/huawei-roll-ads-nas%C4%B1l-kullan%C4%B1l%C4%B1r-910cb7b5ac6c">HUAWEI Roll Ads Nasıl Kullanılır?</a> was originally published in <a href="https://medium.com/huawei-developers-tr">Huawei Developers - Türkiye</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use HUAWEI Roll Ads?]]></title>
            <link>https://medium.com/huawei-developers/how-to-use-huawei-roll-ads-7b4fdd803e84?source=rss-682f622a5f36------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b4fdd803e84</guid>
            <category><![CDATA[hms]]></category>
            <category><![CDATA[huawei-ads]]></category>
            <category><![CDATA[ads]]></category>
            <category><![CDATA[video-ad-maker]]></category>
            <category><![CDATA[advertisement]]></category>
            <dc:creator><![CDATA[Berke Coban]]></dc:creator>
            <pubDate>Tue, 29 Jun 2021 13:46:34 GMT</pubDate>
            <atom:updated>2021-06-29T13:46:34.808Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*Xp0M3_hq6vLfCpah0pynBg.png" /></figure><p>In this article, we will talk about how to show Huawei roll ads in a native android project.</p><h4>What is Roll Ads?</h4><p>Roll ads are displayed as short videos or images, before, during, or after the video content is played.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zUxj1PL3ek8pE_S78iqJmQ.png" /></figure><h4>Useful Links Before Start</h4><p>Check <a href="https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/publisher-service-instream-0000001058253743">this</a> official roll ads guide to learn the details about the roll ads.</p><p>Check <a href="https://github.com/HMS-Core/hms-ads-demo-java">this</a> GitHub page for the Ads Demo project.</p><h3>Preparations Before Coding</h3><h4>Creating an Ad unit id</h4><p>First things first, We need to create our ad units using Huawei Ads Publisher Service. Check <a href="https://developer.huawei.com/consumer/en/monetize/">this</a> link to start.</p><p>This medium post also might help you for creating a Huawei Ad slot id.</p><p><a href="https://sanghati.medium.com/how-to-create-huawei-ads-kit-slot-id-e9666087f30b">How to create Huawei Ads Kit Slot Id ?</a></p><h3>Preparations in Android Studio</h3><h4>Hardware Requirements</h4><p>A Huawei phone running Android</p><h4>Software Requirements</h4><ul><li>Android Studio</li><li>JDK 1.7 or later</li><li>minSdkVersion: 19</li><li>Gradle version: 4.1 or later</li><li>HMS Core (APK) 5.0.3.300 or later</li></ul><h4>Integrate The HUAWEI Ads SDK</h4><p>In your project-level build.gradle, include Huawei’s Maven repository.</p><pre>buildscript <strong>{<br>    </strong>repositories <strong>{<br>        </strong>google()<br>        jcenter()<br>        maven <strong>{ </strong>url &#39;https://developer.huawei.com/repo/&#39; <strong>}<br>    }</strong></pre><pre>allprojects <strong>{<br>    </strong>repositories <strong>{<br>        </strong>google()<br>        jcenter()<br>        maven <strong>{ </strong>url &#39;https://developer.huawei.com/repo/&#39; <strong>}<br>    }<br>}</strong></pre><p><em>In the app-level build.gradle, include Huawei Ads dependency.</em></p><pre>implementation &#39;com.huawei.hms:ads-lite:13.4.40.302&#39;</pre><h3>Demo Application-Roll Ads</h3><p>Let’s start with the layout code for the roll ads. We will use Video View for our video content.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/056287c794f5be97e5612f0df93ac8c5/href">https://medium.com/media/056287c794f5be97e5612f0df93ac8c5/href</a></iframe><p>The structure of this layout is simple, We have a video View that shows the video content, and there is an invisible layout named ‘instream_ad_container’</p><p>This invisible layout contains the elements for the ad. The output of the layout is like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*1ugYoz-5WzxYJWNaEfLwqQ.png" /></figure><p><strong>Note:</strong> Check the Github page of the Demo project if you need drawables or icons.</p><p>Let’s continue with our java code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/36e378a4952a324d93979261c12f48e1/href">https://medium.com/media/36e378a4952a324d93979261c12f48e1/href</a></iframe><p>This is our demo code using Video view. I used ‘startCountDown()’ method to show the ad after 5 seconds. You can implement different algorithm to trigger the advertisement.</p><p>We updated ‘currentTime’ variable when the ad is triggered. If the user skips or finishes watching the ad content, the video will resume from the current time.</p><p><strong>Note:</strong> Enter your ad unit id that is created from the publisher console in ‘configAdLoader()’ method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d_xcdSWnlwA-0uV_T9fI1Q.gif" /></figure><p>Take Care until next time :)</p><h4>References</h4><ul><li><a href="https://developer.huawei.com/consumer/en/doc/HMS-Plugin-Guides/roll-0000001073972145-V1">Document</a></li><li><a href="https://github.com/HMS-Core/hms-ads-demo-java/blob/master/app/src/main/java/com/huawei/hms/ads/sdk/InstreamActivity.java">hms-ads-demo-java/InstreamActivity.java at master · HMS-Core/hms-ads-demo-java</a></li><li><a href="https://sanghati.medium.com/how-to-create-huawei-ads-kit-slot-id-e9666087f30b">How to create Huawei Ads Kit Slot Id ?</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b4fdd803e84" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/how-to-use-huawei-roll-ads-7b4fdd803e84">How to use HUAWEI Roll Ads?</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use Huawei Ads with Smaato Mediation]]></title>
            <link>https://medium.com/huawei-developers/how-to-use-huawei-ads-with-smaato-mediation-f339f5295405?source=rss-682f622a5f36------2</link>
            <guid isPermaLink="false">https://medium.com/p/f339f5295405</guid>
            <category><![CDATA[huawei-ads]]></category>
            <category><![CDATA[banner-ads]]></category>
            <category><![CDATA[mediation]]></category>
            <category><![CDATA[ads]]></category>
            <category><![CDATA[advertising]]></category>
            <dc:creator><![CDATA[Berke Coban]]></dc:creator>
            <pubDate>Wed, 02 Jun 2021 10:36:55 GMT</pubDate>
            <atom:updated>2021-06-02T10:36:55.195Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Fx_5pUpS4wda42aGnuuuQ.jpeg" /></figure><p>In this article, we will talk about showing Huawei ads with Smaato through mediation.</p><p>Supported ad types are Banner and interstitial ads.</p><h3>What is ad meditation?</h3><p>Ad Mediation gives multiple ad networks access to your ad inventory, and gets them to compete against each other for ad slots. This process increases competition among advertisers and in return, increases your ad revenue. The mediation platform checks what CPM all the various ad networks are offering and looks for the highest one.</p><h3>Getting Started</h3><h4>Creating an Ad unit id</h4><p>First things first, We need to create our ad units using Huawei Ads Publisher Service. Check <a href="https://developer.huawei.com/consumer/en/monetize/">this</a> link to start.</p><p><a href="https://sanghati.medium.com/how-to-create-huawei-ads-kit-slot-id-e9666087f30b">This</a> medium post also might help you for creating a Huawei Ad slot id. For Smaato mediation we only need a banner or interstitial slot.</p><p><strong>Note:</strong> While creating a banner ad unit slot make sure your ad size is a small banner (320x50) because only this dimension is supported by Smaato.</p><h4>Smaato Publisher Platform (SPX)</h4><p>We created our Huawei ad slots. Our next step will be creating ad units from the Smaato publisher console and enabling mediation for our Huawei ad slots. Follow the steps below :</p><p>➯ Click <a href="https://developers.smaato.com/publishers-legacy/spx-getting-started/">this</a> link to start using the Smaato SPX portal. Create an account if you don&#39;t have one. After the process is completed, you will be directed to the Smaato dashboard.</p><p>➯ After you entered the dashboard successfully, Our next move will be creating an app. Switch to the inventory tab and click “New App”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X2_eI0bG7WZgLqORSikkCA.jpeg" /></figure><p>Fill this part with the related information about your android application. You don&#39;t need to define ad spaces from this section. We will create them in the next step.</p><p>➯ After the app creation is completed, switch to the inventory tab and click the app you created under “Apps”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*KjGcUDTAcBqgJRrXmq6Dfw.jpeg" /></figure><p>➯ Click “New Adspace” afterward.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BZfDZA7JiuC9q6A0N03w5Q.jpeg" /></figure><p>Give your ad space, name, and description. Ad Format will be “Display Only (Image/Rich Media).” For dimension If you want to create a banner ad, select Banner Phone (320x50), if you want to create an Interstitial ad, select “Fullscreen Interstitial Portrait (320x480)” and click save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*r7ou40eCepatorwR0khR0Q.jpeg" /></figure><p>➯ Our Smaato ad unit is ready. Let’s set up our mediation. Switch to the Network tab from the dashboard and click “New Network”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OLsOXfWBFe0rouGkXcNoeA.jpeg" /></figure><p>➯ Select “Custom SDK Network” and add a line item for your custom network.</p><p>➯ Every line item you created represents one ad unit. When you try to create a line item for your network this page will show up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c6TUVhB1BmASSd6QwcXtnA.jpeg" /></figure><p>This setting page is the most important part of our mediation. Enter the start date, end date, and CPM rate for your needs.</p><p><strong>Class name Banner ad</strong></p><pre> com.hmscl.huawei.smaato_mediation.CustomMediationBanner</pre><p><strong>Class name Interstitial ad</strong></p><pre>com.hmscl.huawei.smaato_mediation.CustomMediationIntersitial</pre><p><strong>Method name Banner ad</strong></p><pre>loadCustomBanner</pre><p><strong>Method name Interstitial ad</strong></p><pre>loadCustomIntersitial</pre><p><strong>Custom Data:</strong></p><pre>{“AD_UNIT_ID”:”YourHuaweiAdUnitId&quot;}</pre><p><strong>Note:</strong> Don&#39;t forget to link this line item with your Smaato ad unit, Under the “Targeting” section you have an option to select it.</p><p>We are done with the Smaato dashboard. Now we need to make some preparations in Android Studio.</p><h3>Android Studio Preparations</h3><h4>Initialize Smaato Legacy SDK</h4><p>Enter Spx dashboard, upper right corner of the page select “Integration options”. Switch to the Android tab and download the Legacy SDK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w9bHYgOdfDh1nXN80ZMr4w.jpeg" /></figure><p>Follow <a href="https://developers.smaato.com/publishers-legacy/android-sdk-getting-started/">this</a> guide to add the Legacy SDK to your project.</p><h4>Initialize Huawei Mediation Plug-in</h4><p>In the project-level build.gradle, include Huawei’s Maven repository.</p><pre>repositories {<br>    google()<br>    jcenter() // Also, make sure jcenter() is included<br>    maven { url &#39;https://developer.huawei.com/repo/&#39; } <br>}<br><br>...<br><br>allprojects {<br>    repositories {<br>        google()<br>        jcenter() // Also, make sure jcenter() is included<br>        maven { url &#39;https://developer.huawei.com/repo/&#39; }<br>    }<br>}</pre><p>First, download the “smaato_mediation-release.aar” file from <a href="https://github.com/Explore-In-HMS/huawei.ads.smaato.mediation/blob/master/smaato_mediation-release.aar">this</a> link.</p><p>Then in Android Studio, after click File-&gt;New-&gt;New Module, select Import AAR&amp;JAR. Then select the downloaded aar file.</p><p>Finally In the app-level build.gradle,</p><pre>dependencies {<br>    implementation fileTree(dir: &quot;libs&quot;, include: [&quot;*.jar&quot;])<br>    implementation project(&quot;:smaato_mediation-release&quot;)<br>}</pre><p>For more details or any updates, follow <a href="https://github.com/Explore-In-HMS/huawei.ads.smaato.mediation">this</a> link to check the github page.</p><h4>Example Banner Java Code</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0a4e2c52ca161d2fc56a03e8f029e99c/href">https://medium.com/media/0a4e2c52ca161d2fc56a03e8f029e99c/href</a></iframe><p>This is our view for the banner ad. add this piece of code to your layout. replace the ad space and publisher id.</p><p>Let’s continue with Java code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c928250ed8dc6613aa57ffd0cb881ca3/href">https://medium.com/media/c928250ed8dc6613aa57ffd0cb881ca3/href</a></iframe><p>This is the simple banner code. If you want a detailed implementation, I recommend you to check <a href="https://developers.smaato.com/publishers-legacy/android-sdk-adformat-banners/">this</a> official guide.</p><p><strong>Note:</strong> If you set your ad space and publisher id to zero, the test ad will be shown for the banner ad.</p><p><strong>Note:</strong> If you don&#39;t know your publisher id, go to the Spx dashboard and check the inventory tab.</p><h3>References</h3><ul><li><a href="https://developers.smaato.com/publishers-legacy/spx-getting-started/">Getting Started with SPX With the Smaato Publisher Platform (SPX) - Smaato</a></li><li><a href="https://developer.huawei.com/consumer/en/hms/huawei-adskit/">Ads Kit - HUAWEI Ads Publisher Service - HUAWEI Developer</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f339f5295405" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/how-to-use-huawei-ads-with-smaato-mediation-f339f5295405">How to use Huawei Ads with Smaato Mediation</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use Huawei Ads with AdMob mediation (Native Android)]]></title>
            <link>https://medium.com/huawei-developers/how-to-use-huawei-ads-with-admob-mediation-native-android-8fc41438dfad?source=rss-682f622a5f36------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fc41438dfad</guid>
            <category><![CDATA[mediation]]></category>
            <category><![CDATA[admob]]></category>
            <category><![CDATA[huawei-ads]]></category>
            <category><![CDATA[hms]]></category>
            <category><![CDATA[ads]]></category>
            <dc:creator><![CDATA[Berke Coban]]></dc:creator>
            <pubDate>Wed, 28 Apr 2021 11:10:06 GMT</pubDate>
            <atom:updated>2022-01-13T05:30:15.605Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zNCjgvuv1VLh-k8F3LRzuA.jpeg" /></figure><p>In this article, we will talk about showing Huawei ads with Admob SDK through mediation. Supported ad types are :</p><p>Banner, interstitial, rewarded, and native ads.</p><p>For cross-platform integrations please check the following medium links :</p><ul><li><a href="https://medium.com/huawei-developers/how-to-use-huawei-ads-with-admob-mediation-flutter-8a3fc3bb1793">How to use Huawei Ads with AdMob mediation (Flutter)</a></li><li><a href="https://medium.com/huawei-developers/how-to-use-huawei-ads-with-admob-mediation-react-native-e02a78ebb1eb">How to use Huawei Ads with AdMob mediation (React Native)</a></li><li><a href="https://medium.com/huawei-developers/how-to-use-huawei-ads-with-admob-mediation-cordova-f48986f40ab1">How to use Huawei Ads with AdMob mediation (Cordova)</a></li></ul><h3>What is ad meditation?</h3><p>Ad Mediation gives multiple ad networks access to your ad inventory, and gets them to compete against each other for ad slots. This process increases competition among advertisers and in return, increases your ad revenue. The mediation platform checks what CPM all the various ad networks are offering and looks for the highest one.</p><h3>Preparations Before Coding</h3><h4>1-) Initialize AdMob Mobile Ads SDK</h4><p>Follow this <a href="https://developers.google.com/admob/android/quick-start">link</a> to integrate AdMob SDK into your android application. This step also includes creating a Google Admob account and registration of your application.</p><p><strong>New AdMob Review Policy</strong></p><p>AdMob changed its review policy in February 2021. Check <a href="https://support.google.com/admob/answer/10417515">this</a> link for the details. This policy applies to the new applications, but before use Huawei mediation adapter contact AdMob support. With this change, Admob can limit your ad serving limit if your application is not linked to a supported app store. (currently, AppGallery is not a supported store)</p><p><strong>This new policy can affect your monetization if your application is listed in AppGallery</strong>. I recommend you to contact AdMob support about the details and effects of this restriction.</p><h4>2-) Configure a custom event on AdMob</h4><p><a href="https://medium.com/huawei-developers/how-to-use-huawei-ads-with-admob-mediation-377bdc1ba01c">How to use Huawei Ads with AdMob mediation ?</a></p><p>Follow the steps in this medium link. After the mediation steps on AdMob console are completed, note your ad unit id(s) to use later in your application.</p><p><strong>Note:</strong> For this step, ad unit creation is needed from Huawei Ads console, check <a href="https://developer.huawei.com/consumer/en/monetize/">this</a> link to create an ad unit. After that add your Huawei ad unit id as a parameter.</p><h4>3-) Integrate The Huawei Mediation Adapter</h4><p>In your project-level build.gradle, include Huawei’s Maven repository.</p><pre>repositories {<br>    google()<br>    jcenter() // Also, make sure jcenter() is included<br>    maven { url &#39;https://developer.huawei.com/repo/&#39; }<br>    maven {url &quot;https://jitpack.io&quot;} <br>}<br><br>...<br><br>allprojects {<br>    repositories {<br>        google()<br>        jcenter() // Also, make sure jcenter() is included<br>        maven { url &#39;https://developer.huawei.com/repo/&#39; }<br>        maven {url &quot;https://jitpack.io&quot;}<br>    }<br>}</pre><blockquote>In the app-level build.gradle, include Huawei Ads dependency (required by the adapter) and the adapter.</blockquote><pre>dependencies {<br>   implementation &#39;com.huawei.hms:ads:3.4.49.301&#39;<br>   implementation <br> &#39;com.github.Explore-In-HMS:huawei.admob_mediation:&lt;latest_version&gt;&#39;<br>}</pre><blockquote>if your app can run only on Huawei mobile phones, you can integrate the Huawei Ads Lite SDK (optional)</blockquote><pre>dependencies {<br>   implementation &#39;com.huawei.hms:ads-lite:13.4.49.301&#39;<br>   implementation <br> &#39;com.github.Explore-In-HMS:huawei.admob_mediation:&lt;latest_version&gt;&#39;<br>}</pre><p>Check <a href="https://github.com/Explore-In-HMS/huawei.ads.admob_mediation">this</a> GitHub page for more details and any updates.</p><h3>Demo Application - Banner Ad</h3><p>Let&#39;s start with our layout…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*UtpJt0LyOK63TBARL0sobg.jpeg" /><figcaption>Banner View AdMob</figcaption></figure><p>This is our banner ad layout. Add this piece of code to your layout. Optionally, you can change the ad size to “LARGE_BANNER” or “MEDIUM_RECTANGLE”. Finally, enter your ad unit id and we are done :)</p><p>After the layout is done, create a Kotlin class and add the following code :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/63f16dbfad95301a1f24f2bdf963e462/href">https://medium.com/media/63f16dbfad95301a1f24f2bdf963e462/href</a></iframe><p>This is the code for the banner ad. You don’t need to use all the methods for the ad listener, as you can see I just filled “onAdFailedToLoad” method. You can use the ad listener methods according to your needs.</p><p>Lifecycle methods are really important to avoid memory leaks and unnecessary ad requests.</p><h3>Other Ad Types</h3><p>For Interstitial ads follow <a href="https://developers.google.com/admob/android/interstitial">this</a> AdMob guide.</p><p>For Rewarded ads follow <a href="https://developers.google.com/admob/android/rewarded-fullscreen">this</a> AdMob guide.</p><p>For Native ads take <a href="https://github.com/googleads/googleads-mobile-android-examples/tree/master/kotlin/admob/NativeAdvancedExample">this</a> Github project as a reference. For the Java version click <a href="https://github.com/googleads/googleads-mobile-android-examples/tree/master/java/admob/NativeAdvancedExample">here</a>.</p><p>After the steps are completed, you only need to change your ad unit id and the adapter will do the rest.</p><h4>Screenshots</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Xm4quP1XM0NzLMaVq1kMw.jpeg" /><figcaption>Banner Example</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7E99Mxb9VVFcwf4uCidYRw.jpeg" /><figcaption>Native Example</figcaption></figure><h4>References</h4><ul><li><a href="https://github.com/googleads/googleads-mobile-android-examples">googleads/googleads-mobile-android-examples</a></li><li><a href="https://github.com/Explore-In-HMS/huawei.ads.admob_mediation">GitHub - Explore-In-HMS/huawei.ads.admob_mediation</a></li><li><a href="https://developers.google.com/admob/android/quick-start">Get Started | Android | Google for Developers</a></li><li><a href="https://developer.huawei.com/consumer/en/hms/huawei-adskit/">Ads Kit - HUAWEI Ads Publisher Service - HUAWEI Developer</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fc41438dfad" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/how-to-use-huawei-ads-with-admob-mediation-native-android-8fc41438dfad">How to use Huawei Ads with AdMob mediation (Native Android)</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to show Huawei ads in Flutter using Mopub mediation?]]></title>
            <link>https://medium.com/huawei-developers/how-to-show-huawei-ads-in-flutter-using-mopub-mediation-9e40adf8e45d?source=rss-682f622a5f36------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e40adf8e45d</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[hms]]></category>
            <category><![CDATA[mopub-mediation]]></category>
            <category><![CDATA[huawei-ads]]></category>
            <category><![CDATA[cross-platform]]></category>
            <dc:creator><![CDATA[Berke Coban]]></dc:creator>
            <pubDate>Wed, 10 Mar 2021 11:17:23 GMT</pubDate>
            <atom:updated>2021-06-02T07:28:46.151Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0FlPtnAk384rMM3z7TWPXA.jpeg" /></figure><p>Ad Monetization is really important for mobile applications and games. But when it comes to maximizing the ad revenue, mediation steps in.</p><h4>What is ad meditation?</h4><p>Ad Mediation gives multiple ad networks access to your ad inventory, and gets them to compete against each other for ad slots. This process increases competition among advertisers and in return, increases your ad revenue. The mediation platform checks what CPM all the various ad networks are offering and looks for the highest one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*0lTenAf5CrrFgBvqRQRMiA.png" /></figure><h3>Preparations before the code</h3><h4>1-) Configure a custom event on MoPub</h4><p>Follow the steps in this medium link. After the mediation steps on mopub console are completed, note your ad unit id(s) to use later in your application.</p><p><a href="https://medium.com/huawei-developers/how-to-use-huawei-ads-with-mopub-mediation-1f49adfdb2b1">How to use Huawei Ads with MoPub mediation</a></p><h4>2-) Integrate The Mediation Adapter</h4><p>Open the android side of your flutter project and follow these steps :</p><p>In your project-level build.gradle, include Huawei’s Maven repository.</p><pre>repositories {<br> google()<br> jcenter()<br> maven { url &#39;https://developer.huawei.com/repo/&#39; }<br> maven <strong>{</strong>url &quot;https://jitpack.io&quot;<strong>}</strong></pre><pre>}<br> ...<br>allprojects {<br>repositories {<br>  google()<br>  jcenter()<br>  maven { url &#39;https://developer.huawei.com/repo/&#39; } <br>  maven <strong>{</strong>url &quot;https://jitpack.io&quot;<strong>}</strong><br>    }<br>}</pre><p>In your app-level build.gradle, include Huawei Ads dependency (required by the adapter) and the adapter.</p><pre>dependencies {<br>    ...<br>   implementation &#39;com.huawei.hms:ads-lite:13.4.41.302&#39;<br>   implementation <br>   &#39;com.github.Explore-In-HMS:huawei.ads.mopub_mediation:1.1.0&#39;<br>}</pre><p>Follow <a href="https://github.com/Explore-In-HMS/huawei.ads.mopub_mediation">this</a> link to check the github page of the adapter for any updates.</p><h4>3-) Integrate Mopub_flutter SDK</h4><p>Currently, banner, interstitial, and rewarded ads are supported by Mopub_flutter SDK. Follow the steps in the link below to integrate the SDK.</p><p><a href="https://pub.dev/packages/mopub_flutter/install">mopub_flutter | Flutter Package</a></p><p>Even if native ads are supported by mediation adapter currently flutter doesn’t provide any SDK for mopub native ads. Follow <a href="https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/native-ads-0000001050198817">this</a> link to integrate Huawei native ads to flutter.</p><p><strong>Note:</strong> To avoid <strong>“java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider”</strong> error , an Admob ID needs to be added to the application.If Admob is not used in the project, add a sample Admob application id to solve this exception.</p><pre>&lt;metadata<br>android:name=&quot;com.google.android.gms.ads.APPLICATION_ID&quot;<br>android:value=&quot;ca-app-pub-3940256099942544~3347511713&quot;/&gt;</pre><p>Add this meta-data tag to the AndroidManifest.xml file (Open the android side of the flutter project to edit the AndroidManifest file.)</p><h3>Demo Application to Show the Ads</h3><p>After the preparations are done, we are ready to show the ads :)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/afded8ea0ea6487d2ed6deb282c291ea/href">https://medium.com/media/afded8ea0ea6487d2ed6deb282c291ea/href</a></iframe><p>This is a sample demo code for banner, interstitial, and rewarded ads. You only need to change the “ad_unit_id ” to IDs created in “Configure a custom event on Mopub ” section.</p><p><strong>Note: </strong>on<strong> </strong>Line 23, you can initialize with one of your ad unit id. ( banner ad id, etc.)</p><p><strong>Note: </strong>For React Native implementation of Mopub mediation follow <a href="https://medium.com/huawei-developers/how-to-use-huawei-ads-with-mopub-mediation-react-native-7381cd339098">this</a> link.</p><h3>Screenshots :</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kbg387PjEF-kehUto2JtiA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GQou-BnGwWWrQi6fmFGO4g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yeoQb6KU552_FJr3UavElw.jpeg" /><figcaption>Mediated ads (banner, interstitial, rewarded)</figcaption></figure><p>Take care until next time …</p><h3>References:</h3><ul><li><a href="https://github.com/Explore-In-HMS/huawei.ads.mopub_mediation">GitHub - Explore-In-HMS/huawei.ads.mopub_mediation</a></li><li><a href="https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/publisher-service-0000001050196431">Document</a></li><li><a href="https://www.mopub.com/en">In-app monetization for app publishers | MoPub</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e40adf8e45d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/how-to-show-huawei-ads-in-flutter-using-mopub-mediation-9e40adf8e45d">How to show Huawei ads in Flutter using Mopub mediation?</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use Huawei ML kit-Face Verification feature?]]></title>
            <link>https://medium.com/huawei-developers/how-to-use-huawei-ml-kit-face-verification-feature-4ee50eff34f4?source=rss-682f622a5f36------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ee50eff34f4</guid>
            <category><![CDATA[hms-core]]></category>
            <category><![CDATA[hms]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ml-kit]]></category>
            <category><![CDATA[face]]></category>
            <dc:creator><![CDATA[Berke Coban]]></dc:creator>
            <pubDate>Wed, 03 Feb 2021 07:57:53 GMT</pubDate>
            <atom:updated>2021-02-03T07:57:53.076Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*n0a208yu3I6yl6cfGRY5Ag.gif" /></figure><p>In this article, I am going to give you information about Huawei ML kit’s Face Verification and how to use it in native android applications. Let’s get started :)</p><h3>Integrating Applications to HMS Core</h3><p>To start developing an app with Huawei mobile services, you need to integrate your application to the HMS core. Check the link below to integrate your application, also <strong>don’t forget to enable the ML kit</strong> from AppGallery Connect.</p><p><a href="https://medium.com/huawei-developers/android-integrating-your-apps-with-huawei-hms-core-1f1e2a090e98">Android | Integrating Your Apps With Huawei HMS Core</a></p><h3>Service Introduction</h3><p>This service recognizes and extracts key features of the face in the template, compares the features with those of the face in the input image, and then determines whether the two faces belong to the same person based on their similarity.</p><h3>Use Cases</h3><p>This service is widely used in many fields of daily life. For example, the service can compare faces in the mobile gallery and classify them according to their similarity. This helps users manage the mobile gallery and find images in it. Face verification is also useful for the financial service sector. When a user tries to open an account remotely using your app, your app can use this service to perform identity authentication, making the opening process fast and secure with controllable risk factors. If your app is for fun, you can leverage the facial similarity provided by this service to develop interesting functions. For example, your app can tell how much its user and another person look like a couple according to the images he/she uploads. Besides, this service can also be used for smart clock-in/out and facial authentication of smart gates in smart campuses.</p><h3>Precautions</h3><ul><li>Currently, the service cannot compare two faces greatly different in age or blocked area proportion (over 30%).</li><li>If a template image contains multiple faces, the biggest one is chosen as the template face. If the input image contains multiple faces, the service extracts the three largest faces for comparison with the template face.</li><li>The service can produce its optimal effect if the following conditions are met.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*oxFZpuFRhUpL3iemHs4YIw.png" /><figcaption>Optimal effect if the following conditions are met.</figcaption></figure><h3>Preparations for the Code</h3><p>Let’s try Face verification with a demo application. In this example, I will give 2 images as input and try to learn if those two faces in the images belong to the same person.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*gRznNboOGyhQV4hb-clzbA.jpeg" /><figcaption>Build dependencies of the service</figcaption></figure><p>The total size of the model is around 6.5 MB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tw2O0ZGEzAee4KkuEgh9BA.jpeg" /><figcaption>AndroidManifest.xml</figcaption></figure><h3>Java Code of the Face Verification</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2de24be601da1266fb135b9419128759/href">https://medium.com/media/2de24be601da1266fb135b9419128759/href</a></iframe><p>It is really simple, isn’t it? First, we set images to Imageview, and between lines 24–27, then we create an analyzer and first frame with the input. On line 29 it is essential to check if the input frame contains proper face(s). After this control, we can start the Comparing part. On “startCompare” method we set our second frame to compare with the first image. Finally, in the Successful scenario, we also print the probability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m9lCReriCTssl2__l05-qA.jpeg" /></figure><p>In conclusion, this feature can be used in many areas like Facial authentication, Face similarity apps, or grouping images according to the person in the image, etc.</p><p>Also, Like Huawei Face detection this feature works totally on-device. Therefore it works fast and securely.</p><p>Take care of yourself until next time …</p><h3>References:</h3><p><a href="https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/faceverification-0000001071919926">Document</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ee50eff34f4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/how-to-use-huawei-ml-kit-face-verification-feature-4ee50eff34f4">How to use Huawei ML kit-Face Verification feature?</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use Huawei ML kit-Sound Detection feature?]]></title>
            <link>https://medium.com/huawei-developers/how-to-use-huawei-ml-kit-sound-detection-feature-5bb5cf996aa5?source=rss-682f622a5f36------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bb5cf996aa5</guid>
            <category><![CDATA[ml-kit]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[hms-core]]></category>
            <category><![CDATA[hms]]></category>
            <category><![CDATA[huawei]]></category>
            <dc:creator><![CDATA[Berke Coban]]></dc:creator>
            <pubDate>Mon, 28 Dec 2020 05:50:20 GMT</pubDate>
            <atom:updated>2020-12-28T08:51:57.509Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W2U2ghRdgPLM39R0vfx7NA.jpeg" /></figure><p>In this article, I am going to give you information about Huawei ML kit’s Sound Detection service and how to use the service in native android applications. Let’s get started :)</p><h3>Integrating Applications to HMS Core</h3><p>To start developing an app with Huawei mobile services, you need to integrate your application to the HMS core. Check the link below to integrate your application, also <strong>don’t forget to enable the ML kit</strong> from AppGallery Connect.</p><p><a href="https://medium.com/huawei-developers/android-integrating-your-apps-with-huawei-hms-core-1f1e2a090e98">Android | Integrating Your Apps With Huawei HMS Core</a></p><h3>Service Introduction</h3><p>The sound detection service can detect sound events in online (real-time recording) mode. The detected sound events can help you perform subsequent actions. Currently, the following types of sound events are supported: laughter, a child crying, snoring, sneezing, shouting, mew, barking, running water (such as water taps, streams, and ocean waves), car horns, doorbell, knocking, fire alarm sounds (such as fire alarm and smoke alarm), and other alarm sounds (such as fire truck alarm, ambulance alarm, police car alarm, and air defense alarm).</p><h3>Use Cases</h3><p>This service is widely used in daily life. For example, in a case in which hearing is impaired, it is difficult to receive a sound event such as an alarm, a train whistle, or a doorbell. The function may be used to assist in receiving a surrounding sound signal, so as to remind a user to make a timely response when an emergency occurs. In addition, if a user is not accompanied by a baby, the user may not be able to learn about the baby’s status in a timely manner. This function enables the user to detect the key sounds of the baby, such as crying, to learn about the baby’s abnormalities as soon as possible.</p><h3>Precautions</h3><p>Currently, the detection result of only one sound event can be returned. Mixed scenarios (multiple sound events occur at the same time) are not supported. The interval between two different sound events must be at least 2 seconds.</p><h3>Sound Types</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1b0caee4439323b7f68665de3c164a8c/href">https://medium.com/media/1b0caee4439323b7f68665de3c164a8c/href</a></iframe><p>These instances represent the type of sounds. As you can see currently 13 types of sounds can be detected by the Sound Detection Service. We will use these integer values while coding. The First 4 instances represent the errors. Let’s continue with the preparations for our Demo application.</p><h3>Preparations for the Code</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*Xnj35XNk5fh1HfQCts8mwQ.jpeg" /><figcaption>Build dependencies of the service</figcaption></figure><p>Service can work only with base SDK but for precise results, it is recommended to use both dependencies. The total size of both dependencies is around 6 MB.</p><p>If you are using model package dependency and have a published application, updating the model is important.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O_CzNAICJK9nGtwt3z_AZQ.jpeg" /><figcaption>AndroidManifest.xml</figcaption></figure><p><strong>Note: </strong>For using this service, also Record Audio permission is required and applied by the user on runtime before service is started.</p><h3>Java Code of the Sound Detection</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/de0b98ff4dd80dfdaed266d601c494a2/href">https://medium.com/media/de0b98ff4dd80dfdaed266d601c494a2/href</a></iframe><p>This is the simple code for detecting baby cry, laughter, and knocking sounds. You can check the Sound type section to detect more sounds.</p><p>In line 43 and line 44 code for stopping and destroying the detector can be found.</p><p>After the detection is successful, many functionalities can be triggered (pushing notifications, etc. ) according to the app’s need.</p><p>Take care of yourself until next time …</p><h3>References:</h3><p><a href="https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/sound-detection-0000001055282786">Document</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bb5cf996aa5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/how-to-use-huawei-ml-kit-sound-detection-feature-5bb5cf996aa5">How to use Huawei ML kit-Sound Detection feature?</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Huawei ML Kit’in Yeni Özellikleri]]></title>
            <link>https://medium.com/huawei-developers-tr/huawei-ml-kitin-yeni-%C3%B6zellikleri-ed6d1d596ab7?source=rss-682f622a5f36------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed6d1d596ab7</guid>
            <category><![CDATA[hms-core]]></category>
            <category><![CDATA[hms]]></category>
            <category><![CDATA[huawei]]></category>
            <category><![CDATA[huawei-mobile-service]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Berke Coban]]></dc:creator>
            <pubDate>Fri, 13 Nov 2020 07:25:05 GMT</pubDate>
            <atom:updated>2020-11-13T08:09:06.415Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fNNCnbYRI2Ix8u0a.jpeg" /></figure><h3>Huawei Ml kit’in yeni özellikleri nelerdir?</h3><p>21 Ağustos’ta Ml kitin yeni güncellemesi yayınlandı. Bu versiyon ile Ml kite 4 yeni servis eklendi. Servislerden bahsetmeden önce uygulamanızı Huawei mobil servislerine entegre etmek için gerekli bilgileri vererek başlayayım.</p><h3>Android uygulamamı HMS Core ‘a nasıl entegre edebilirim ?</h3><p>Huawei mobil servislerini kullanabilmemiz için uygulamamızın AppGallery Connect’e bağlı olması gerekiyor. Aşağıdaki linkten entegre etmek için gerekli adımları bulabilirsiniz. İşlemler tamamlandıktan sonra AppGallery Connect üzerinden Ml Kit’i aktif etmeyi unutmayın.</p><p><a href="https://medium.com/huawei-developers/android-integrating-your-apps-with-huawei-hms-core-1f1e2a090e98">Android | Integrating Your Apps With Huawei HMS Core</a></p><h3>1-) Image Super-Resolution</h3><p>Bu servis ‘1x’ ve ‘3x olmak üzere fotoğraflarda 2 tür iyileştirme sağlıyor. 3x’te artı olarak fotografta genişletme uygulanabiliyor. Genel olarak fotoğraflardaki gürültünün giderilmesi ve netleştirme gibi işlemler uygulanıyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-y9pr98SsZ3_Nwlo.png" /></figure><h3>Dikkat edilmesi Gerekenler</h3><ul><li>Serviste kullanılacak olan bitmapler ARGB formatında olmalı.Servisten size dönecek olan fotoğraflar da ARGB formatındadır.</li><li>3x super-resolution senaryosunda, fotoğrafın uzun kısmı en az 64 en fazla 1024 piksel olabilir.</li><li>1x super-resolution senaryosunda, fotoğrafın uzun kısmı en az 64 en fazla 800 piksel olabilir. fotoğrafın kısa kısmı ise en az 1 en fazla 768 piksel olabilir.</li><li>Verilen fotoğrafın kalitesinin iyi olduğu durumlarda değişim farkedilmeyebilir.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3QDNCK0UcZWogBrE.jpeg" /><figcaption>Image Super-Resolution örneği</figcaption></figure><h3>Image Super-Resolution Java Kodu</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*MTO2YnTwV-K2dt_KdVpuvg.jpeg" /><figcaption>build.gradle</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1e9dbeb817ce5e460aecffbdc723bb9f/href">https://medium.com/media/1e9dbeb817ce5e460aecffbdc723bb9f/href</a></iframe><h3>2-) Document Skew Correction</h3><p>Bu servis dökümanın konumunu alıp , eğiminin giderilmesini sağlıyor. Açı ile çekilmiş fotoğrafların düzeltilmesini ve yazıların daha okunabilir olmasını sağlamaktadır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/0*X0kkcTHQTjMNtBdx.png" /></figure><h3>Dikkat edilmesi Gerekenler</h3><ul><li>En iyi sonucu 30 derecelik eğimde alabilirsiniz.</li><li>30 dereceden fazla eğimde dökümanın sınırlarının belirgin olması daha iyi sonuçlar sağlamaktadır.</li></ul><h3>Java Code of the Document Skew Correction</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*LGL3usx2tHF35vokQcmwPQ.jpeg" /><figcaption>build.gradle</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1328655765fbd9e78d5d47fd2fcf440d/href">https://medium.com/media/1328655765fbd9e78d5d47fd2fcf440d/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/0*NrIP6IsIkLis083s.jpeg" /><figcaption>Document Skew Correction Örneği</figcaption></figure><h3>3-) Liveness Detection</h3><p>Liveness Detection servisi kamera ile yüzün yakalanması ve yakalanan yüzün gerçek bir kullanıcıya ait olup olmadıgının tespiti için kullanılıyor.Örneğin daha önceden çekilmiş bir yüz fotoğrafı yada videosu olduğu durumların tespit edilmesini sağlar. Genel olarak telefon kilidi açılması ve kimlik doğrulaması alanlarında yoğun bir şekilde kullanılmaktadır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/0*o2KAshthC94jQKNk.png" /></figure><h3>Java Code of the Liveness Detection</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*i5UU_d30MIDh-d1w.jpeg" /><figcaption>build.gradle</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c2cbe4e496c6ae842502fd46ddaad3cf/href">https://medium.com/media/c2cbe4e496c6ae842502fd46ddaad3cf/href</a></iframe><p>16. satırda activity verilmesi gerekiyor. (örneğin “MainActivity.this”) Bu kisimdan sonra otomatik olarak bir kamera ekrani açılacak ve kullanıcı yüzünü tarattığında callback tetiklenmiş olacak.</p><p><strong>Not: Bu servis için ayrıca kamera izni gerekmektedir.Aşağıdaki kodu “AndroidManifest.xml” dosyasına eklemeniz gerekmektedir.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*oW_1nezBbvwZcuz1H1qODA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/0*HImvwDwu-GcM_qOs.gif" /></figure><h3>4-) Hand Keypoint Detection</h3><p>Bu servis ile eldeki 21 nokta (parmak ucu, parmak eklemi ve bilekte dahil olmak üzere ) tespit edilip , noktaların koordinatları döndürülür. Şuanda servis statik fotoğraf üzerinde ve kamera akışı üzerinde çalışabiliyor.</p><p>Servis elin yüzde 50&#39; sinin görünür durumda olmadığı ve eldivenin bulunduğu senaryolarda düzgün çalışmamaktadır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/0*dR88G8Ma5tgInP88.png" /></figure><h3>Hand Keypoint Detection Java kodu(Statik fotoğraf)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*fqoT-2YYf3spzE4I4wKf_g.jpeg" /><figcaption>build.gradle</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/32f56eb61e8e02f0081acd1c7a6bd83d/href">https://medium.com/media/32f56eb61e8e02f0081acd1c7a6bd83d/href</a></iframe><p>El fotoğrafı bitmap formatında servise verilmelidir. başarılı bi şekilde noktalar alındıktan sonra “Canvas.drawLine()” metodu yardımıyla noktalar arasına çizgilerde çizebilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*QBSH5KdHymUC-czb.jpeg" /><figcaption>Hand Keypoint Detection Çıktısı</figcaption></figure><p>Bir sonraki buluşmamıza kadar sağlıklı günler ..</p><h3>Referanslar:</h3><p><a href="https://developer.huawei.com/consumer/en/hms/huawei-mlkit">ML Kit - Machine Learning Service - HUAWEI Developer</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed6d1d596ab7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers-tr/huawei-ml-kitin-yeni-%C3%B6zellikleri-ed6d1d596ab7">Huawei ML Kit’in Yeni Özellikleri</a> was originally published in <a href="https://medium.com/huawei-developers-tr">Huawei Developers - Türkiye</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>