We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

Quick App

Introduction to Quick Apps

Huawei quick apps are free of installation. Compared with traditional Android apps, quick apps have the following advantages:

  • Low cost. Quick apps are developed using simple languages including JavaScript and Cascading Style Sheets (CSS). The code volume of a quick app is about one fifth of that of a traditional app.
  • Good user experience. Quick apps are natively rendered and can access the system.
  • High retention rate. Quick apps are installation-free and can be added to home screens by guide.

Push Kit allows for message sending to Huawei quick apps.

Preparations

Before you start developing a quick app, configure your app information in AppGallery Connect. The procedure is as follows:

  1. Register as a developer
  2. Create a quick app
  3. Generate a certificate fingerprint
  4. Enabling Push Kit

For details, please refer to Creating a Quick App.

Development Guide

Token Obtaining

For details about how to obtain a token, please refer to Integrating Push Kit.

Message Sending

You can customize the message payload (by setting the message type to the data message) to send messages to quick apps. The message content will be parsed by Huawei Quick App Engine. The following second table lists the parameters in a message body to be sent to a quick app.

Expand

Parameter

Type

Mandatory (M)/Optional (O)

Description

pushtype

Integer

M

Message type. The options are as follows:

  • 0: notification message
  • 1: data message

pushbody

pushbody Object

M

Message body. For details about the structure, please refer to pushbody.

pushbody

Expand

Parameter

Type

Mandatory (M)/Optional (O)

Description

title

String

O

Notification message title.

description

String

O

Notification message content.

page

String

O

Path of the quick app page that is displayed when a user taps a notification message.

params

Object

O

Data contained in the message body when a user taps a notification message. Example: {\"key1\":\"test1\",\"key2\":\"test2\"}

NOTE

When pushtype is set to 0, a message that does not contain the params parameter can be successfully sent but will not be displayed.

ringtone

ringtone Object

O

Vibration and breathing light for the notification message. For details, please refer to ringtone.

messageId

String

O

Data message ID.

data

String

O

Data message content.

ringtone

Expand

Parameter

Type

Mandatory (M)/Optional (O)

Description

vibration

String

O

Indicates whether to vibrate when receiving a message. The value true indicates yes.

breathLight

String

O

Indicates whether to display the breathing light when receiving a message. The value true indicates yes.

You can use either of the following methods to send messages:

  • From AppGallery Connect: You can specify some target users and send the messages to both quick apps on the live network and those running on Huawei Quick App Loader. For details, please refer to Quick App.
  • Through server API: You can send messages to a large number of users in batches for both quick apps on the live network and those running on Huawei Quick App Loader.

A quick game can receive push messages when the following conditions are met.

Expand

Message Type

Prerequisite

Notification message

A quick app has been used before, and either of the following conditions is met:

  • Quick App Center earlier than 3.2.1: The quick app has been added to the home screen or My quick apps, or is running.
  • Quick App Center 3.2.1 or earlier: The quick app has been added to the home screen or favorites.
NOTE
  • To debug your app on Huawei Quick App Loader, ensure that the loader is running.
  • If you have installed Phone Manager on your phone for debugging, enable auto-launch for your quick app in Phone Manager.
  • You can refer to the sample code to develop your quick app for adaptation.

Checklist

After integrating Push Kit into your app, check your app against the Pre-release Checklist and make sure your app meets all requirements before submitting it for release.