Simple cordova application using cordova-plugin-fcm-with-dependecy-updated.
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.
git clone https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated.git
;cd cordova-plugin-fcm-with-dependecy-updated-app-example
;- Download your
google-services.json
, from https://console.firebase.google.com, to the main directory; cordova run android
;- 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); - 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:
FB_SERVER_KEY="your firebase server key" TARGET="the device's firebase token or topic" php tools/notify-both.php
- And look at your device: