There may be various reasons why push notifications do not work. I have provided a set of steps for implementing push notifications. Look, maybe you missed something.
push- Ionic ( android):
. Firebase package name id
config.xml.
google-services.json .- Android
$ ionic platform add android ( ) - firebase
$ ionic plugin add cordova-plugin-firebase.
. , google-services.json , .
firebase onNotificationOpen.
build.gradle :
buildscript {
dependencies {
classpath 'com.google.gms:google-services:3.1.0'
}
}
dependencies {
compile "com.google.firebase:firebase-core:+"
compile "com.google.firebase:firebase-messaging:+"
}
Android $ ionic build android
- push-. .
. API - , Cloud Messaging Legacy server key firebase.
, , , subscribe.