/cordova-plugin-fcm-with-dependecy-updated-app-example

Simple cordova application using cordova-plugin-fcm-with-dependecy-updated.

Primary LanguageJavaScriptMIT LicenseMIT

cordova-plugin-fcm-with-dependecy-updated-app-example

GitHub license GitHub issues GitHub forks GitHub stars Known Vulnerabilities DeepScan grade

Simple cordova application using cordova-plugin-fcm-with-dependecy-updated.

Don't forget:

Make sure that in Android SDK Manager it is installed:

  • Android Support Library version 23 or greater
  • Android Support Repository version 20 or greater
  • Google Play Services version 27 or greater
  • Google Repository version 22 or greater

Check the wiki for more.

Build and Run Steps

  1. git clone https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated.git;
  2. cd cordova-plugin-fcm-with-dependecy-updated-app-example;
  3. Download your google-services.json, from https://console.firebase.google.com, to the main directory;
  4. cordova run android;
  5. Grab the value of FB_SERVER_KEY, that can be found accessing https://console.firebase.google.com, at the configurations section (step by step tutorial);
  6. To define the TARGET, you might use a topic or the device token.
  • For all, ios or android devices (/topics/all, /topics/ios, /topics/android). As they are automatically subscribed to those.
  • Or grab the firebase token, presented on app start:

Device Token is presented on device start 7. Run:

FB_SERVER_KEY="your firebase server key" TARGET="the device's firebase token or topic" php tools/notify-both.php
  1. And look at your device:

Device showing notifications