hms agent_hms广告套件

hms agent

Nowadays, traditional marketing has left its place on digital marketing. Advertisers prefer to place their ads via mobile media rather than printed publications or large billboards. In this way, they can reach their target audience more easily and they can measure their efficiency by analyzing many parameters such as ad display and the number of clicks.

如今,传统营销已在数字营销上占了上风。 广告客户更喜欢通过移动媒体而不是印刷出版物或大型广告牌来放置广告。 这样,他们可以更轻松地覆盖目标受众,并且可以通过分析许多参数(例如广告展示和点击次数)来衡量效率。

In addition to in-app purchases, the most common method used by mobile developers to generate revenue from their application is to create advertising spaces for advertisers.

除了应用程序内购买外,移动开发人员用来从其应用程序产生收入的最常用方法是为广告客户创建广告空间。

In this sense, Huawei Ads meets the needs of both advertisers and mobile developers. So what is this HMS Ads Kit, let’s take a closer look.

从这个意义上讲,华为广告可以满足广告商和移动开发商的需求。 那么,这个HMS Ads Kit是什么,让我们仔细看看。

什么是华为广告工具包? 它有什么优势? (What is Huawei Ads Kit? What are its advantages?)

Image for post

HMS Ads Kit is a mobile service that helps us create high quality and personalized ads in our application. It provides many useful ad formats such as native ads, banner ads and rewarded ads to more than 570 million Huawei device users worldwide.

HMS Ads Kit是一项移动服务,可帮助我们在应用程序中制作高质量和个性化的广告。 它为全球超过5.7亿的华为设备用户提供了许多有用的广告格式,例如本地广告,横幅广告和奖励广告。

华为广告工具包的优点: (Advantages of Huawei Ads Kit :)

Provides high income for developers

为开发商提供高收入

It collaborates with a large number of premium advertisers covering industries such as e-commerce, education, automobile and branding to ensure with high fill rate of ad spaces and competitive effective cost per mile (eCPM).

它与涵盖电子商务,教育,汽车和品牌等行业的大量高级广告客户合作,以​​确保高广告空间填充率和具有竞争力的每英里有效成本(eCPM)。

Creates advertising contents based on user profiles that makes it possible to earn money more efficiently by using the analysis of users’ interests.

根据用户个人资料创建广告内容,从而可以通过使用用户兴趣分析来更有效地赚钱。

It follows the most advantageous revenue sharing and incentive policies in the sector so that you can generate more income. (For 2020, this rate is 90% of revenue on behalf of developers)

它遵循了该行业最有利的收入共享和激励政策,因此您可以产生更多的收入。 (对于2020年,此比率是代表开发人员的收入的90%)

Rich ad format options

丰富的广告格式选项

It offers a wide variety of mainstream ad formats such as native, rewarded, banner and splash advertisements to best suit your application’s design requirements in different scenarios.

它提供了多种主流广告格式,例如原生广告,奖励广告,横幅广告和醒目广告,以最适合您在不同情况下应用程序的设计要求。

It saves you ad development time with its fast integration based on native dynamic templates.

基于本地动态模板的快速集成可以节省您的广告开发时间。

It saves you ad development time with its fast integration based on native dynamic templates. Also, the smart pairing functionality provides a consistent user experience across applications on different devices.

基于本地动态模板的快速集成可以节省您的广告开发时间。 此外,智能配对功能还可以跨不同设备上的应用程序提供一致的用户体验。

It allows users to download apps with a single click without being redirected to another screen. In this way, it prevents user losses caused by redirection.

它允许用户单击一次下载应用程序,而无需重定向到另一个屏幕。 这样,可以防止由于重定向导致的用户损失。

Provides versatile support

提供多种支持

It facilitates analysis with visualized reports.It easily handles professional reviews. With the help of the ad review expert group, it maintains ad quality and prevents inappropriate and illegal ad content.

它通过可视化报告促进分析,并轻松处理专业评论。 在广告审核专家组的帮助下,它可以保持广告质量并防止出现不当和非法的广告内容。

HUAWEI Ad Publisher Service uses Huawei’s extensive user base and extensive data capabilities to deliver high-quality advertising content to the target audience of the ad with OAID.

HUAWEI Ad Publisher Service利用华为广泛的用户基础和广泛的数据功能,通过OAID向广告的目标受众提供高质量的广告内容。

什么是OAID? (What is OAID?)

OAID, Open Advertising Identifier, offered by Huawei Ads, is a non-persistent device identifier. It allows users to meet personalized advertising content in line with their interests.

华为广告提供的OAID( 开放广告标识符)是一种非永久性的设备标识符。 它使用户可以根据自己的兴趣来满足个性化广告内容。

You can also collaborate with third-party tracking platforms using OAID to measure advertising efficiency and calculate revenue.

您还可以使用OAID与第三方跟踪平台进行协作,以衡量广告效率并计算收入。

It protects the privacy of users under the GDPR (EU General Data Protection Regulation). Users can reset the OAID in the device settings if they wish. If they wish, they can disable personalized ads using the way Settings> Privacy> Ads and Privacy or Settings> Security & privacy> More settings> Device identifier.

它根据GDPR(欧盟通用数据保护法规)保护用户的隐私。 用户可以根据需要在设备设置中重置OAID。 如果愿意,他们可以使用设置>隐私>广告和隐私或设置>安全和隐私>其他设置>设备标识符来禁用个性化广告。

广告格式 (Ads Formats)

Image for post

Many ad formats are offered with the Huawei Ads Kit so that you can choose the format that will provide the best experience for your users. Currently, you can easily integrate banner, native, rewarded, interstitial and splash ads types into your application.

Huawei Ads Kit提供了许多广告格式,因此您可以选择能为用户提供最佳体验的格式。 当前,您可以轻松地将横幅广告,原生广告,奖励广告,非页内广告和醒目广告类型集成到您的应用程序中。

Banner Ads are rectangular ad images located at the top, middle or bottom of an application’s layout. Banner ads are automatically refreshed at intervals. When a user taps a banner ad, in most cases the user is taken to the advertiser’s page.

标语广告是位于应用程序布局顶部,中间或底部的矩形广告图像。 标语广告会定期自动刷新。 当用户点击横幅广告时,在大多数情况下,该用户将被带到广告客户的页面。

Rewarded Ads are generally preferred in gaming applications. They are the ads that in full-screen video format that users choose to view in exchange for in-app rewards or benefits.

奖励广告通常是游戏应用程序中的首选。 它们是用户选择观看的全屏视频格式的广告,以换取应用内奖励或好处。

Native Ads are ads that take place in the application’s interface in accordance with the application flow. At first glance they look like they are part of the application, not like an advertisement.

原生广告是根据应用程序流程在应用程序界面中发生的广告。 乍一看,它们看起来像是应用程序的一部分,而不是广告。

Interstitial Ads are full screen ads that cover the application’s interface. Such that ads are displayed without disturbing the user’s experience when the user launches, pauses or quits the application.

插页式广告是覆盖应用程序界面的全屏广告。 这样,当用户启动,暂停或退出应用程序时,可以在不干扰用户体验的情况下显示广告。

Splash Ads are ads that are displayed right after the application is launched, before the main screen of the application comes.

初始广告是在应用程序启动后,应用程序主屏幕出现之前立即显示的广告。

HMS Ads Kit如何集成到项目中? (How is HMS Ads Kit Integrated into the Project?)

First of all, we need to meet several requirements to integrate the HMS Ads Kit into our project. These are;

首先,我们需要满足几个要求才能将HMS Ads Kit集成到我们的项目中。 这些是;

  • Android Studio

    Android Studio
  • Java JDK (1.7 or later)

    Java JDK(1.7或更高版本)
  • HMS Core (APK) (4.0.0 or later)

    HMS Core(APK)(4.0.0或更高版本)

Before using HMS kits, we need to make sure we connect our project to AppGallery. You can find detailed information on how to integrate AppGallery Connect SDK into the project in this article.

在使用HMS套件之前,我们需要确保将项目连接到AppGallery。 你可以找到关于如何AppGallery连接SDK集成到该项目的详细信息, 这篇文章

1.Adding grades dependencies and configuring obfuscation scripts

1,添加等级依赖并配置模糊化脚本

  • First, let’s add the following dependencies to the build.gradle file at the project level.

    首先,让我们在项目级别的build.gradle文件中添加以下依赖项。

  • Then add build dependencies to the application level build.gradle file and click Sync Now to synchronize our project.

    然后将构建依赖项添加到应用程序级别的build.gradle文件 ,然后单击立即同步以同步我们的项目。

implementation 'com.huawei.hms:ads-lite:13.4.30.301'
  • Finally, let’s configure the cloaking scripts in app/proguard-rules.pro file.

    最后,让我们在app / proguard-rules.pro文件中配置隐藏脚本。

-keep class com.huawei.openalliance.ad.** { *; }
-keep class com.huawei.hms.ads.** { *; }

2.Huawei Ads SDK integration

2.华为广告SDK集成

  • Let’s call HwAds.init() in the onCreate() method of the MainActivity.java class to launch the HUAWEI Ads SDK.

    让我们在MainActivity.java类的onCreate()方法中调用HwAds.init()以启动HUAWEI Ads SDK。

I will use the banner ads format in this project. If you wish, you can use other ads formats offered by Huawei.

我将在此项目中使用横幅广告格式。 如果需要,可以使用华为提供的其他广告格式。

3.Adding the BannerView Class

3,添加BannerView类

  • Let’s add BannerView to the XML layout file that we will access via the path res> layout> activity_main.xml. And in order, let’s set the hwads:adId for the ad slot ID and hwads:bannerSize for the ad size.

    让我们将BannerView添加到XML布局文件中,我们将通过路径res> layout> activity_main.xml进行访问 。 并依次为广告位ID设置hwads:adId ,为广告尺寸设置hwads:bannerSize

You can use the table below to use different banner sizes.

您可以使用下表使用不同的横幅大小。

Image for post
  • After creating the XML file, we need to add BannerView to the MainActivity.java file and set the ad slot ID and banner ad size using setAdId and setBannerAdSize respectively.

    创建XML文件后,我们需要将BannerView添加到MainActivity.java文件中,并分别使用setAdIdsetBannerAdSize设置广告位ID和横幅广告大小。

  • Then we import the required classes into MainActivity.java.

    然后,将所需的类导入MainActivity.java中

import android.widget.RelativeLayout;
import com.huawei.hms.ads.BannerAdSize;
import com.huawei.hms.ads.banner.BannerView;

Note: You can register on the Huawei Developer website with either individual or enterprise developer account. Before completing your application and publishing it on AppGalery, you need to replace the test_id with the Ad Slot Id you will receive from your enterprise developer account. You can easily register on the Huawei Developer website using the link.

注意:您可以使用个人或企业开发人员帐户在华为开发人员网站上注册。 在完成您的应用程序并将其发布到AppGalery上之前,您需要将test_id替换为将从您的企业开发者帐户收到的广告位ID。 您可以使用链接轻松在Huawei Developer网站上注册。

  • After the BannerView is added, we call the loadAd() method of the BannerView class in MainActivity to obtain a banner ad.

    添加BannerView之后,我们在MainActivity中调用BannerView类的loadAd()方法来获取横幅广告。

When you run the project, you will see the test banner ad on the screen. Congratulations! I hope it has been a useful post :)

运行项目时,您会在屏幕上看到测试横幅广告。 恭喜你! 我希望这是一个有用的帖子:)

Image for post

翻译自: https://medium.com/huawei-developers/hms-ads-kit-591ff55d8499

hms agent

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值