title: handling expo push notifications when app is closed
body: <p>Expo sdk 37</p>
  
  <pre><code>componentDidMount() {
  this.registerForPushNotificationsAsync();
  this._notificationSubscription = Notifications.addListener(this._handleNotification);
  }
  _handleNotification = notification =&gt; {
  Vibration.vibrate();
  console.log(notification);
  console.log(“hello”)
  this.setState({ notification: notification });
  };
  
  </code></pre>
  
  <p>When the app is foregrounded the handle function is executed and the console.log is executed but when the app is closed the handle function is not executed at all?
  Can anyone help?</p>