[Huawei Developers] Hakki Ozer:
Huawei App Messaging Service Part1

Hello everyone, I will explain what is app messaging service, what are the advantages, what are the differences from push kit and how can we use the service in our own applications. App messaging is a service that provides messages and notifications to target active users of the application. Using the console, we can send a message to the application in the format desired, when the users use the application.

​

In which scenarios can we use the App Messaging?

App messaging is used in almost all kinds of applications, from games, banking applications, food service applications to shopping brands.

Online Shopping Mobile Applications

One of the most well-known of these is discount or opportunity campaign information on online shopping websites’ mobile applications. These shopping sites detect the requests of the users according to the behavior analysis of the users or the events such as button clicks that will trigger the app messaging. According to these analyzes, they present messages about their campaigns to the user.

​

Mobile Games

Another well-known scenario is in-app information, instructional explanations and sales campaigns in mobile games.

​

The Themes Applications

One of the scenario examples is its use in applications that provide visual services on the phone. In these applications, new product information in the application is made using the app messaging image feature.

​

Encourage users

Another scenario is that app messaging can be used to encourage users to watch video, to share app-related features, campaigns, game scores on their social media and to keep up with payment transformation.

​

Also, with the help of app messaging, We can encourage users to engage with our applications.

Use For Advertising

If we have an advertising agreement with other brands, we can deliver the ads of these brands to users with app messaging in the template we want.

​

*According to the usage of the applications of the users, their preferences can be analyzed and certain messages can be presented to the user

*The preferences made by the users while using the applications can be analyzed and the messages determined using these analyzes can be presented to the user.

*According to our scenarios, messages can be presented in the form of cards, pictures.

*Data about users can be collected.

Differences Between App Messaging and Push Kit

*App messaging message is arranged by the client and triggered by an event. Push kit message is transmitted by server.

*App messaging message is displayed when the user is using our application. However, It is enough to install the application on our phone to receive the push kit message.

*There are many templates in app messaging and we can customize them. The message style is simple. The notification bar only has a predefined simple style template.

*App messaging message contents are determined according to user behavior. But, the app kit message has weak correlation with user behavior.

*App messaging has attractive and enhancing features for active users. However, app kit message is used to deliver simple notifications and reminders to users about the app.

Getting Started

Development Environment and Skill Requirements

*A computer with Android Studio installed for app development

*Skills in Java and Android Studio

*A developer account registered by referring to Registration and Verification

Device Requirements

*A device running Android 4.2 or a later version

Preparations Before Development

Before we start to apps development , we should apply some steps to our own project. the following preparations:

*Create an app in AppGallery Connect.

*Create an Android Studio project.

*Add the app package name.

*Configure the Maven repository address and AppGallery Connect gradle plug-in.

*Synchronize the project.

we can follow the link below for the steps above.

("https://developer.huawei.com/consumer/en/codelab/AGCPreparation/index.html#0"]https://developer.huawei.com/consumer/en/codelab/AGCPreparation/index.html#0[/URL]

the App Messaging SDK Integration

We need to download and add SDK into our application for App messaging.

1. Firstly, we need to sign in to AppGallery Connect and select My projects.

2. Secondly, we need to select the app then we need to enable App Messaging using the app list in our project.

3. After that, we need to click agconnect-services.json to download the configuration file from the project setting page and copy the agconnect-services.json file and paste it to the app root directory.

​

4. Fourthly, we need to open the app-level build.gradle file and add the following code for HUAWEI Analytics Kit and the App Messaging SDK integration. Then synchronize the configuration.

("https://gist.githubusercontent.com/hakki2391/4b875a293272b35680d64f2ad2251d08/raw/f716762bfb1a946be60d7d30c862a17fc886c7d2/Dependencies")

Enabling App Messaging

*Firstly, we will sign in to AppGallery Connect and select My projects.

*Secondly, we will find our project from the project list and click the app for which we want to enable App Messaging on the project card.

*Finally, we will go to Growing then we will find App Messaging and click Enable now.

​

How can we create a Message

*Firstly, sign in to AppGallery Connect and select My projects.

*Select the app for which we need to enable App Messaging from the app list in our project.

*Go to Growing then find App Messaging.

*Click New.

​

*Set the style and content. We can set Type to image, banner, and pop-up like below

​

*We will use pop-up.

​

*Now, set other parameters as required. Click Next.

​

*On this point, set the sending target condition and the package name of the current app.

​