Notification not working when app is closed

hi every one i have an app where i need to send notification it’s working very fine on emulator but on device it’s not working … it works when the app is opened but when it’s closed it don’t show
here is the used code
i used FMC provider

async getToken() {

    let token;
    if ('android')) {
      token = await this.firebaseNative.getToken()
    if ('ios')) {
      token = await this.firebaseNative.getToken();
      await this.firebaseNative.grantPermission();
    return this.saveTokenToFirestore(token)
  // Save the token to firestore
  private saveTokenToFirestore(token) {
    if (!token) return;
    const devicesRef = this.afs.collection('devices')
    const docData = { 
      userId: 'user:'+this.deviceID,
    return devicesRef.doc(token).set(docData)

  // Listen to incoming FCM messages
  listenToNotifications() {
    return this.firebaseNative.onNotificationOpen()

@ionic-native/firebase”: “^4.0.0”,
“angularfire2”: “^5.0.0-rc.11”,
@ionic-native/background-mode”: “^4.20.0”,
please help me
thank u