Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

HMS Push FCM Cordova Demo

Contents


1. Introduction

This demo application demonstrates the usage of HMS Push FCM Cordova Plugin.


2. Installation Guide

2.1. Cordova

  1. Install Cordova CLI.

    npm install -g cordova
  2. Open the demo project root folder.

  3. Update the widget id property which is specified in the config.xml file.

  4. Add the Android platform to the project.

    cordova platform add android
  5. Install HMS Push FCM Cordova Plugin and HMS 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
  6. Install Firebase Messaging Cordova Plugin to the project.

  7. Add keystore(.jks) and build.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>"
            }
        }
    }
  8. Run the application.

    cordova run android --device

3. Configuration and Description


4. Questions or Issues

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.


5. Licencing and Terms

HMS Push FCM Cordova Plugin is licensed under the Apache 2.0 license.