andrehtissot / cordova-plugin-fcm-with-dependecy-updated

Google FCM Push Notifications Cordova Plugin
MIT License
209 stars 277 forks source link

onTokenRefresh() is deprecated, when we will have update on it for ionic #170

Closed dvsingh9 closed 4 years ago

dvsingh9 commented 4 years ago

Describe the bug Notifications not working if we go for onTokenRefresh() with ionic

To Reproduce Steps to reproduce the behavior: just use onTokenRefresh() and notifications wont work with new token.

Expected behavior onNewToken(String s) should be used

Environment (please complete the following information):

Package.json

{
  "name": "hour4u",
  "version": "0.0.1",
  "author": "Codemiro Technologies",
  "homepage": "https://hour4u.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "build:ios": "ionic cordova build ios --prod --release --minifyjs --optimizejs --minifycss",
    "build:android": "ionic cordova build android --prod --release --aot --minifyjs --optimizejs --minifycss",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "~8.2.14",
    "@angular/core": "~8.2.14",
    "@angular/forms": "~8.2.14",
    "@angular/platform-browser": "~8.2.14",
    "@angular/platform-browser-dynamic": "~8.2.14",
    "@angular/router": "~8.2.14",
    "@auth0/angular-jwt": "^4.2.0",
    "@ionic-native/android-permissions": "^5.27.0",
    "@ionic-native/app-version": "^5.27.0",
    "@ionic-native/background-geolocation": "^5.27.0",
    "@ionic-native/background-mode": "^5.27.0",
    "@ionic-native/calendar": "^4.20.0",
    "@ionic-native/camera": "^5.27.0",
    "@ionic-native/core": "^5.27.0",
    "@ionic-native/fcm": "^5.27.0",
    "@ionic-native/file": "^5.27.0",
    "@ionic-native/file-path": "^5.27.0",
    "@ionic-native/geolocation": "^5.27.0",
    "@ionic-native/in-app-browser": "^5.27.0",
    "@ionic-native/keyboard": "^5.27.0",
    "@ionic-native/launch-navigator": "^5.27.0",
    "@ionic-native/network": "^5.27.0",
    "@ionic-native/onesignal": "^5.28.0",
    "@ionic-native/screen-orientation": "^5.27.0",
    "@ionic-native/splash-screen": "^5.27.0",
    "@ionic-native/status-bar": "^5.27.0",
    "@ionic-super-tabs/angular": "^6.4.0",
    "@ionic-super-tabs/core": "^6.2.0",
    "@ionic/angular": "^5.2.3",
    "@ionic/storage": "^2.2.0",
    "@mauron85/cordova-plugin-background-geolocation": "^3.1.0",
    "build": "0.1.4",
    "cordova-browser": "6.0.0",
    "cordova-ios": "^5.1.1",
    "cordova-plugin-actionsheet": "^2.3.3",
    "cordova-plugin-android-permissions": "^1.0.2",
    "cordova-plugin-app-version": "^0.1.9",
    "cordova-plugin-background-mode": "^0.7.3",
    "cordova-plugin-calendar": "^5.1.5",
    "cordova-plugin-camera": "^4.1.0",
    "cordova-plugin-dialogs": "^2.0.2",
    "cordova-plugin-fcm-with-dependecy-updated": "^2.4.0",
    "cordova-plugin-file": "^6.0.2",
    "cordova-plugin-filepath": "^1.5.8",
    "cordova-plugin-geolocation": "^4.0.2",
    "cordova-plugin-inappbrowser": "^3.2.0",
    "cordova-plugin-ionic-keyboard": "^2.0.5",
    "cordova-plugin-nativegeocoder": "^3.4.1",
    "cordova-plugin-network-information": "^2.0.2",
    "cordova-plugin-screen-orientation": "^3.0.2",
    "cordova-plugin-x-socialsharing": "^5.6.8",
    "cordova-sqlite-storage": "^5.0.1",
    "cordova-uxcam": "^3.3.0",
    "core-js": "^2.5.4",
    "es6-promise-plugin": "^4.2.2",
    "hammerjs": "^2.0.8",
    "ionic": "^5.4.16",
    "ionic2-super-tabs": "^4.1.4",
    "ionic4-rating": "^1.0.9",
    "moment": "^2.27.0",
    "ngx-countdown": "^10.0.0",
    "rxjs": "~6.5.1",
    "snazzy-info-window": "^1.1.1",
    "time-ago-pipe": "^1.3.2",
    "tslib": "^1.13.0",
    "uk.co.workingedge.phonegap.plugin.launchnavigator": "^5.0.4",
    "y": "^0.3.2",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.803.29",
    "@angular/cli": "8.3.28",
    "@angular/compiler": "~8.2.14",
    "@angular/compiler-cli": "~8.2.14",
    "@angular/language-service": "~8.2.14",
    "@ionic/angular-toolkit": "^2.3.0",
    "@ionic/lab": "^3.1.7",
    "@types/hammerjs": "^2.0.36",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "^5.2.2",
    "cordova-android": "^9.0.0",
    "cordova-plugin-device": "^2.0.3",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-ionic-webview": "^4.2.0",
    "cordova-plugin-splashscreen": "^5.0.4",
    "cordova-plugin-statusbar": "^2.4.3",
    "cordova-plugin-whitelist": "^1.3.4",
    "jasmine-core": "~3.4.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.5.4",
    "protractor": "^5.4.4",
    "ts-node": "~7.0.0",
    "tslint": "~5.15.0",
    "typescript": "~3.4.3"
  },
  "description": "The Hour4u Ionic Project",
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-background-mode": {},
      "cordova-plugin-fcm-with-dependecy-updated": {
        "FCM_VERSION": "19.0.0",
        "GRADLE_TOOLS_VERSION": "3.5.3",
        "GOOGLE_SERVICES_VERSION": "4.3.3",
        "SUPPORT_LIBRARY_VERSION": "28.0.0",
        "ANDROID_DEFAULT_NOTIFICATION_ICON": "@mipmap/ic_launcher"
      },
      "cordova-plugin-calendar": {
        "CALENDAR_USAGE_DESCRIPTION": " ",
        "CONTACTS_USAGE_DESCRIPTION": " "
      },
      "cordova-plugin-network-information": {},
      "cordova-sqlite-storage": {},
      "cordova-plugin-camera": {
        "ANDROID_SUPPORT_V4_VERSION": "27.+"
      },
      "cordova-plugin-file": {},
      "cordova-plugin-screen-orientation": {},
      "cordova-plugin-x-socialsharing": {
        "ANDROID_SUPPORT_V4_VERSION": "24.1.1+"
      },
      "cordova-plugin-android-permissions": {},
      "cordova-plugin-geolocation": {
        "GEOLOCATION_USAGE_DESCRIPTION": "To locate you"
      },
      "cordova-plugin-inappbrowser": {},
      "cordova-uxcam": {},
      "uk.co.workingedge.phonegap.plugin.launchnavigator": {
        "GOOGLE_API_KEY_FOR_ANDROID": "DwaF5GYb2lC1GXLpMmfdfadfadfsdfadsfdNe0",
        "OKHTTP_VERSION": "3.12.0"
      },
      "cordova-plugin-filepath": {},
      "cordova-plugin-app-version": {},
      "@mauron85/cordova-plugin-background-geolocation": {
        "GOOGLE_PLAY_SERVICES_VERSION": "10.+",
        "ANDROID_SUPPORT_LIBRARY_VERSION": "26+",
        "ICON": "@mipmap/ic_launcher",
        "SMALL_ICON": "@mipmap/ic_launcher",
        "ACCOUNT_NAME": "@string/app_name",
        "ACCOUNT_LABEL": "@string/app_name",
        "ACCOUNT_TYPE": "$PACKAGE_NAME.account",
        "CONTENT_AUTHORITY": "$PACKAGE_NAME",
        "ALWAYS_USAGE_DESCRIPTION": "I am using your location",
        "MOTION_USAGE_DESCRIPTION": "I am using your location ... "
      },
      "cordova-plugin-background-geolocation": {}
    },
    "platforms": [
      "browser",
      "ios"
    ]
  }
}
dvsingh9 commented 4 years ago

SO link : https://stackoverflow.com/questions/51123197/firebaseinstanceidservice-is-deprecated

andrehtissot commented 4 years ago

Are seriously still using v2.4.0? There was a huge number of bug fixes, improvements on compatibility with new versions of iOS and Android and fixes due to changes to SDK and Apple/Google services.

Please, upgrade right away! :)