Ionic access to storage on background when push notification arrives

When push notifications arrive I’m trying to save this notifications to storage. Is it possible to access storage at fcm.onNotification method.

Here is my code.

fcm.onNotification().subscribe(data=>{

    this.storage.set("NOTIFICATION",data);

  if(data.wasTapped){
    console.log("Received in background");
     this.redirectPage();
  } else {
      this.showPushToast();
    console.log("Received in foreground");
  };
})