- 1. Introduction
- 2. Installation Guide
- 3. Configuration and Description
- 4. Questions or Issues
- 5. Licencing and Terms
This demo application demonstrates the usage of HMS Push FCM 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 FCM Cordova Plugin
andHMS Push Cordova Plugin
to the project. Run the following command in the root directory of your project to install it through npm.cordova plugin add @hmscore/cordova-plugin-hms-pushfcm cordova plugin add @hmscore/cordova-plugin-hms-push
-
Install
Firebase Messaging Cordova Plugin
to the project. -
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 FCM Cordova Plugin is licensed under the Apache 2.0 license.