[AppsUP] Collection of Integration Cases for Push Kit - Huawei Developers

More information about the AppsUP contest, you can visit HUAWEI Developer Forum.​
AppsUP contest was launched on 30 June. Now more and more developers take part in it. Undoubtedly, many developers encounter the issues in the process of integrating apps. In my previous articles, I have collected cases about Account Kit and Map Kit. Today I want to share the collection of Push Kit with you.
HMS PUSH KIT CLIENT SIDE (PART 1)
Huawei Push Kit is a messaging service provided by Huawei for developers. It establishes a communication channel between the cloud and devices. Using Huawei Push Kit, developers can send the latest messages to users, which helps developers maintain closer ties with users and increases user awareness and activity. This article explains how to integrate HMS core Push kit into your apps.
HMS PUSH KIT SERVER SIDE ( PART2 )
Huawei Push Kit is already available more than 200+ countries and regions. It offers the capacity of sending 10 million messages per second from the server, delivering 99% of them and providing real time push reports to improve the DAU of your apps. In this article, you can see how to send notification to devices from server using HMS Push Kit.
Push Notification Using Airship SDK For HMS Devices
Airship is a platform for customer engagement, lifecycle marketing, and analytics and data solutions. This SDK expose messaging and data-gathering functionality on client devices. This Article is Mainly Focused on Messaging (Push Notification) by Using Airship’s SDK.
Build Your Own Server From Scratch To Send Push Notification Using : Node Js, Express Js, MongoDB, EJS, HMS Core Push Kit & Retrofit
In this article, it introduces how to create your own local server on your machine, store push token send from Huawei devices to a dedicate database and also send notification using a static webpage.
HMS Push Kit : Delineated using React Native
HMS PUSH KIT is developed and proposed with an intention to bring more user engagement, easy integration and communication with customers. Here is the introduction of developing HMS Push Kit apps.
Cordova HMS Binding
In this article, it introduces what is Cordova, how to settings up an application using CLI and how to integrate Cordova application with HMS bindings.
Push Kit with Cordova: Implementing onNotificationOpened
Some of the push plugins have notification click listeners as a functionality. Here I will try to explain a workaround to do it with HMS Push Kit in Cordova, so that we can manage our application when it is opened upon a push notification tab.
HMS Push Kit Cordova Plugin: fs.copyFileSync is not a function
There are a number of reasons this might happen - first make sure that you've imported the nodejs 'fs' module into your project before you use it. I will focus on the error you might meet when you try to build or run your Cordova project.
Certificate Fingerprint Error and possible troubleshooting steps
This is a common error you may face while integrating any of the HMS Core kits in your Android app. Sometimes a single error message can be generated by multiple causes. In this article, I try to solve certificate fingerprint error with the integration of Push Kit, ready to test and get the first Device Token.
Comparison of Methods for Obtaining Data of Android Devices Between Google FCM and HUAWEI Push Kit
As we all know, the ability to push messages to users is a very important function. I proceeded to study some of the functions of Google Firebase Cloud Messaging (FCM) and HUAWEI Push Kit. Among the functions, I paid most attention to ones that had to do with data statistics. In this article, I will share this experience with you.
How to send push notifications to Huawei devices
With Push kit, you can send push notifications or data messages to your app users from the App Gallery Connect Console or by the Push API. In this article, I’m going to show you how to send notifications and data messages using the push kit.
Implement HMS Push Kit with Flutter
Push Kit is a real time cross platform messaging service, which establishes a messaging channel from the cloud to devices. You can send notifications your Android, iOS and Web users using Push Kit.
I will regularly update this post in the following days. Hope it can benefit you.
Any doubts or questions about Push Kit, let me know in the reply.

Related

[AppsUP] Collection of Integration Cases for Analytics Kit

AppsUP contest has been launched since June 30. If you missed the optimal chance to participate in, hurry up now. This time I will share the collection of integration cases for Analytics Kit. If you still have no idea about integrating this kit. Hope this can help you know it better.
Huawei Mobile Services (HMS) Analytics Kit Implementation and Usage for Android
In this article, the author tries to explain Huawei Analytics Kit implementation for an Android app. In addition, he will create a demo project and check analysis on AppGallery Connect dashboard.
Analytics Kit – Customize START and END Analytics page events for no activity pages
This articles helps users to know how to track a specific navigation events for start or end pages in fragments or any specific space.
Data Export API of Analytic Kit
Data export functions is very useful for developers who use their own prefer Business intelligence (BI) system for unified data analysis.
Using advanced Analytics events with Kotlin
This post aims to help developers use Kotlin to implement the Advanced Analytics feature in their codebase.
Demystifying Data Binding - Android Jetpack Part 1 – Novice
Using data binding can lead to faster development times, faster execution times and easier to read (and maintain) code. In this article we will learn about Data binding library from Novoice mode to Proficient mode
Demystifying Data Binding - Android Jetpack Part 2 – Advanced
Data Binding allows you to bind data and UI elements so that when the data changes, the pertinent elements are updated on screen.
Demystifying Data Binding - Android Jetpack Part 3 – Proficient
Data Binding can be achieved by using main components of MVVM i.e. Live Data and View Model. In this article, the author introduces the proficient way to receives the latest available data If an activity or fragment is recreated due to a configuration change (for instance, device rotation).
Optimize Conversion Rate Using A/B Testing
With Huawei Analytics Kit, A/B testing can be a fantastic method to obtain valuable insight regarding visitor behavior and to improve applications or website conversion rate.
Multi-dimensional Event Analysis|HUAWEI Analytics Kit (1)
HUAWEI Analytics Kit is a one-stop data analysis platform for mobile app developers that utilizes data to drive daily app operations, bringing out dynamic details in a comprehensive, timely, and efficient manner.
Change your Data Storage in a Published App
This article explains how to generate a work order for changing this data storage once your app has been released with a different one than the one you need.
Related articles you can refer:
[AppsUP] Collection of Integration Cases for Account Kit
[AppsUP] Collection of Integration Cases for Map Kit
[AppsUP] Collection of Integration Cases for Push Kit
If you want to know other cases about this kit, let your comment below or ask your questions in HUAWEI Developer Forum.

[AppsUP] Collection of Integration Cases for Ads Kit

AppsUP contest, with $1million as the prize, has been online for one month. Many developers feed some integrating issues back in this forum. In my previous articles, I have collected cases about Account Kit, Map Kit, Push Kit and Analytics Kit. Today I want to share the collection of Ads Kit with you.
How To Create Ads Slot ID Using HMS Ads Kit
HUAWEI Ads Publisher Service utilizes Huawei's vast user base and extensive data capabilities to deliver targeted, high quality ad content to users. In this article, it elaborates how to create Ads kit and use it to monetize our app.
Integrate Ads kit in Flutter Application
With HUAWEI Ads Publisher Service, your app will be able to generate revenues while bringing your users content which is relevant to them. This article focuses on integrating HMS Ads kit into a flutter application.
HMS Ad kit. Native ads
Huawei Ads enables developers to deliver high quality ad content to their users. Native ads fit seamlessly into the surrounding content to match the app design. In this article we are going to learn how to integrate Native Ad into our apps.
How to Develop a Reward Ads in 10 Min ? (Part 1)
By integrating HMS ads kit we can start earning right away. It is very useful particularly when we are publishing a free app and want to earn some money from it. This article introduces how to integrate Reward Ad into our apps.
HMS Ads Kit feat. Splash Ads (Part 2)
There are a range of ad formats so developers can choose whichever that suits their app best. This article introduces how to integrate ads in splash screen by using HMS Splash Ads kit.
HMS Ads Kit feat. Banner Ads (Part 3)
Use the HUAWEI Ads SDK to quickly integrate HUAWEI Ads into your app. When developers choose an ad format, they are ready to start bringing in revenue using the advertising services. This article explains how to integrate banner ads by using HMS Banner Ads kit.
Want to monetize you application, Huawei Ads Kit comes to the rescue
Ads kit will not only monetize your application but also create an interactive feel within your application apart from that Ads Kit will help you boom your business model to the next level. This article introduces you different kind of ads you can take advantage from.
AD kit collections: Huawei vs AdMob
Ad kit service maximizes the value of every impression by combining global advertiser demand, innovative ad formats, and advanced app monetization technology. In this article, the author introduces how to integrate banner ad and reward video ad provided by Google Admob and Huawei Ad kit in single application.
Maximizing app monetization with Publisher Service of HUAWEI Ads Kit
This article aims to help developers solve how to maximize app monetization through in-app ads, while at the same time providing a positive app user experience.
How to add Native Ads, Interstitial Ads and Rewarded Ads in Flutter
In this article we will be discussing about how we can integrate Interstitial Ads, Reward Ads and Native Ads.
Monetize your app with Ads Kit
Can you image that one app is not only free but enables you to make money? Before this, you may think it is impossible. But in this article, it shows you how to place ads in you app and monetize by using it.
Unleashing HMS ADs kit: with React Native
The journey from newspaper advertisement to digital advertisement is been beautiful as we understand the need of advertisement in any business. This article introduces how to quickly add banner ads.
More cases you want to know, let me know in the reply.
Follow me and check the updated post at any time.

Result Code 22 Reported in Self-check: checkUpdate API Not Integrated

Symptom
When I submitted my app to AppGallery Connect for self-check, the following message was displayed:
MAJOR:22: Integrate the version update API (checkUpdate). If you already integrate the API, check whether the HMS SDK code is obfuscated in the configuration file. For details about how to modify the configuration file, visit https://developer.huawei.com/consum...es/appgallerykit-preparation#h1-1574846682104.
Analysis
To determine the reason for integrating the API, I submitted a ticket to Huawei technical support in the following link:
https://developer.huawei.com/consumer/en/support/feedback
I was told that this API is required for joint operations games and apps for which HUAWEI AppGallery Connect Distribution Service Agreement For Paid Apps is signed. For details about how to integrate the API, please refer to:
Joint operations games:
https://developer.huawei.com/consum...lery-connect-Guides/appgallerykit-game-update
Joint operations apps:
https://developer.huawei.com/consum...llery-connect-Guides/appgallerykit-app-update
If you have not signed HUAWEI AppGallery Connect Distribution Service Agreement For Paid Apps, check whether corresponding resource files for the IAP SDK or DRM SDK have been introduced to your app project. If so, the self-check tool will regard your app as a joint operations app, and prompt you to integrate the checkUpdate API. In this case, delete the related resources and perform the self-check again.
Solution
In addition to joint operations apps that integrate the IAP SDK, other apps have introduced resource files.
Then, after I had deleted the IAP-related resource files, based on the reply from Huawei technical support, the problem was ultimately resolved during self-check.

HMS Toolkit Makes Integrating HMS Core Kits Effortless

Curious about how to integrate HMS Core kits into your apps? Or how to convert your apps integrated with third-party mobile services? Want the quickest and simplest way to release them on HUAWEI AppGallery?
Introducing HMS Toolkit.
This IDE plugin provides tools such as Getting Started, Configuration Wizard, and Repository and is designed for every stage of development: creation, coding, debugging, testing, releasing, and quality analysis. Armed with HMS Toolkit, you too can develop your own HMS Core-integrated apps in Android Studio and release them at lower cost and higher efficiency.
Every development phase, faster and easier
Getting Started demonstrates each HMS Core kit.
Configuration Wizard walks you through all the necessary settings, so no more looking up the manual or switching tools. Configure multiple kits at the same time, for different scenarios, so no more four-hour jobs – now just 5 minutes.
Repository shows you SDK version, package size, and usage to make integration and version a one-stop-shop. Automatically add an SDK library dependency after you select the library, get the latest SDK version, and upgrade the SDK with just one click.
Coding Assistant offers HMS Core API descriptions and sample code and templates by scenario. Drag and drop to generate and configure code, and get automatic issue warnings and recommendations.
Convertor helps you move from third-party APIs to HMS APIs. Convert your source code either with Add HMS API (add code to call HMS APIs to match third-party APIs so both can be called as needed), or To HMS API (replace code to call third-party APIs with code to match HMS APIs so only HMS APIs can be called).
Cloud Debugging uses a remote real device to quickly locate and resolve problems. Currently, choose from various Huawei devices if you're in the Chinese mainland, Russia, Asia Pacific, and West Europe. Quickly access the nearest site for single-step or ADB debugging. Drag and drop to upload files, zoom in and out onscreen, and toggle definitions between smooth, SD, and HD on the remote real device as needed.
Cloud Testing tests your app in one click to quickly detect problems on any device. Get screenshots for compatibility, stability, performance, and power consumption.
Publish to AppGallery Connect makes uploading easier to do from the IDE. Choose to upload either the packaged APK of the current project (default) or a local package, and its parameters will be checked against the release requirements. Once it's uploaded, you'll be prompted to access the HUAWEI AppGallery Connect release page.
HMS Toolkit also allows you to generate an API or demo project in one click for quickly verifying and calling the image classification model in your app.
Easy to install
Start Android Studio, go to File > Settings > Plugins > Marketplace, search for HMS Toolkit, and click Install. Or sign in and get it on the HUAWEI Developers official website.
HMS Toolkit will continue to be optimized to help you and other developers around the world create a smart life for users.
If you have any questions, please submit a ticket. Huawei technical support will reply to you as soon as possible.
For more information about HMS Toolkit, go to >>
For how to quickly integrate each kit using HMS Toolkit, go to >>
For more operation tutorials, go to >>
For more details, you can go to:
l Our official website
l Our Development Documentation page, to find the documents you need
l GitHub to download demos and sample codes
l Stack Overflow to solve any integration problems
Very useful sharing.

How to Target Ads Precisely While Protecting User Privacy

Background​
When using an app, if pop-up ads keep appearing when we browse app pages but we are not interested in the advertised content, not only will our browsing experience be negatively affected, but we will also quickly become tired of the advertised content. Unwanted ads are usually annoying. Aimless ad targeting and delivery will result in the wrong ads being sent to users and cause poor ad performance.
So, as publishers, how do we guarantee that we can deliver ads to audiences who will be interested in them and how can we decrease users' resistance to advertising? The answer is to collect information about the user requirements of your target audiences or to really know them, and to do so in a way that causes the least annoyance. But when a user is unwilling to share their personal data, such as age, gender, and interests, with my app, placing an ad based on the page that the user is browsing is a good alternative.
For example, a user is reading an article in a news app about the fast-paced development of electric vehicles, rapidly improving battery technology, and the expansion of charging stations in cities. If the targeted advertising mechanism understands the context of the article, when users continue to read news articles in the app, they may see native ads from nearby car dealerships for test driving electric vehicles or ads about special offers for purchasing electric vehicles of a certain brand. In this way, user interests can be accurately discovered, and publishers can perform advertising based on the keywords and other metadata included in the contextual information of the app page, or any other content users are reading or watching, without having to collect users' personal information.
But I can't integrate these features all by myself, so I started searching for tools to help me request and deliver ads based on the contextual information on an app page. That's when I had the great fortune to discover Ads Kit of HMS Core. Ads Kit supports personalized and non-personalized ads. Personalized ad requests require users to grant the app access to some of their personal information, which may not be palatable for some users. Non-personalized advertising, however, is not constrained by this requirement.
Non-personalized ads are not based on users' past behavior. Instead, they target audiences using contextual information. The contextual information includes the user's rough geographical location (such as city) authorized by the user, basic device information (such as the mobile phone model), and content of the current app or search keyword. When a user browses a piece of content in your app, or searches for a topic or keyword to express a specific interest, the contextual ad system scans a specific word or a combination of words, and pushes an ad based on the page content that the user is browsing.
Today, data security and personal privacy requirements are becoming more and more stringent. Many users are very hesitant to provide personal information, which means that precise ad delivery is becoming harder and harder to achieve. Luckily, Ads Kit requests ads based on contextual information, enabling publishers to perform ad delivery with a high degree of accuracy while protecting user privacy and information.
Now let's take a look at the simple steps we need to perform in order to quickly integrate Ads Kit and perform contextual advertising.
Integration Steps​
1. Ensure that the following prerequisites are met before you integrate the Ads Kit:
HMS Core (APK) 4.0.0.300 or later should be installed on devices. If the APK is not installed or an earlier version has been installed, you will not be able to call the APIs of the Ads Kit.
Before you begin the integration process, make sure that you have registered as a Huawei developer and completed identity verification on HUAWEI Developers.
Create a project and add an app to the project for later SDK integration.
2. Import the Ads SDK.
You can integrate the Ads SDK using the Maven repository.
That is, before you start developing an app, configure the Maven repository address for Ads SDK integration in your Android Studio project.
The procedure for configuring the Maven repository address in Android Studio is different for Gradle plugin versions earlier than 7.0, Gradle plugin 7.0, and Gradle plugin versions 7.1 and later. Configure the Maven repository address accordingly based on your Gadle plugin version.
3. Configure network permissions.
To allow apps to use cleartext HTTP and HTTPS traffic on devices with targetSdkVersion 28 or later, configure the following information in the AndroidManifest.xml file:
Code:
<application
...
android:usesCleartextTraffic="true"
>
...
</application>
4. Configure obfuscation scripts.
Before building the APK, configure the obfuscation configuration file to prevent the SDK from being obfuscated.
Open the obfuscation configuration file proguard-rules.pro in your app's module directory of your Android project, and add configurations to exclude the SDK from obfuscation.
Code:
-keep class com.huawei.openalliance.ad.** { *; }
-keep class com.huawei.hms.ads.** { *; }
5. Initialize the SDK.
You can initialize the SDK in the activity, or initialize the SDK by calling the HwAds.init(Context context) API in the AdSampleApplication class upon app launch. The latter method is recommended, but you have to implement the AdSampleApplication class by yourself.
6. Request ads based on contextual information.
The SDK provides the setContentBundle method in the AdParam.Builder class for you to pass contextual information in an ad request.
The sample code is as follows:
Code:
RewardAd rewardAd = new RewardAd(this, rewardId);
AdParam.Builder adParam = new AdParam.Builder();
String mediaContent = "{\"channelCategoryCode\":[\"TV series\"],\"title\":[\"Game of Thrones\"],\"tags\":[\"fantasy\"],\"relatedPeople\":[\"David Benioff\"],\"content\":[\"Nine noble families fight for control over the lands of Westeros.\"],\"contentID\":[\"123123\"],\"category\":[\"classics\"],\"subcategory\":[\"fantasy drama\"],\"thirdCategory\":[\"mystery\"]}\n";
adParam.setContentBundle(mediaContent);
rewardAd.loadAd(adParam.build(), new RewardAdLoadListener());
Conclusion​Nowadays, advertising is an important way for publishers to monetize their apps and content, and how to deliver the right ads to the right audiences has become a key focus point. In addition to creating high quality ads, significant efforts should be placed on ensuring precise ad delivery. As an app developer and publisher, I was always searching for methods to improve ad performance and content monetization in my app. In this article, I briefly introduced a useful tool, Ads Kit, which helps publishers request ads based on contextual information, without needing to collect users' personal information. What's more, the integration process is quick and easy and only involves a few simple steps. I'm sure you'll find it useful for improving your app's ad performance.
References​Development Guide of Ads Kit

Categories

Resources