- 1. Introduction
- 2. Installation Guide
- 3. Configuration and Description
- 4. Questions or Issues
- 5. Licensing and Terms
This demo application demonstrates the usage of HMS Push Cordova Plugin.
-
Install Cordova CLI.
npm install -g cordova
-
Open the demo project root folder.
-
Update the widget
id
property which is specified in theconfig.xml
file. -
Add the Android platform to the project.
cordova platform add android
-
Install
HMS Push Cordova Plugin
to the project. You can either install the plugin throughnpm
or bydownloading from HMS Core Plugin page
.a. Run the following command in the root directory of your project to install it through npm.
cordova plugin add @hmscore/cordova-plugin-hms-push
b. Or download the plugin from Plugin > Push Kit > Cordova Plugin page and run the following command in the root directory of your project to install it manually.
cordova plugin add <hms_cordova_push_plugin_path>
-
Add
keystore(.jks)
andbuild.json
files to your project's root directory.- You can refer to 3rd and 4th steps of Generating a Signing Certificate Codelab tutorial page for generating keystore file.
- Fill
build.json
file according to your keystore information. For example:
{ "android": { "debug": { "keystore": "<keystore_file>.jks", "storePassword": "<keystore_password>", "alias": "<key_alias>", "password": "<key_password>" }, "release": { "keystore": "<keystore_file>.jks", "storePassword": "<keystore_password>", "alias": "<key_alias>", "password": "<key_password>" } } }
-
Run the application.
cordova run android --device
If you have questions about how to use HMS samples, try the following options:
- Stack Overflow is the best
place for any programming questions. Be sure to tag your question
with
huawei-mobile-services
. - GitHub is the official repository for these plugins, You can open an issue or submit your ideas.
- Huawei Developer Forum HMS Core Module is great for general questions, or seeking recommendations and opinions.
- Huawei Developer Docs is place to official documentation for all HMS Core Kits, you can find detailed documentations in there.
If you run into a bug in our samples, please submit an issue to the GitHub repository.
HMS Push Cordova Plugin is licensed under the Apache 2.0 license.