# Ionic 6 capacitor push-notification

**URL:** <https://forum.ionicframework.com/t/ionic-6-capacitor-push-notification/232175>\
**Category:** Capacitor\
**Tags:** announcement\
**Created:** [March 30, 2023, 9:51am UTC](https://forum.ionicframework.com/t/ionic-6-capacitor-push-notification/232175 "2023-03-30T09:51:20Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![twestrick](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/twestrick/32/136131_2.png) [@twestrick](https://forum.ionicframework.com/u/twestrick)\
**Post date:** [March 30, 2023, 6:56pm UTC](https://forum.ionicframework.com/t/ionic-6-capacitor-push-notification/232175/3 "2023-03-30T18:56:03Z")

</div>

Can you share your code? I have not noticed any issues in my app.

For push notifications when the app is in the foreground, I create a local notification. See this discussion - [Push Notifications click\_action called before notification actually clicked - #11 by twestrick](https://forum.ionicframework.com/t/push-notifications-click-action-called-before-notification-actually-clicked/232009/11).

I register all the listeners on app boot (in Vue, in the `main.ts` file) before the app is mounted. I first call `removeAllListeners` and then re-register them. When I was setting up push notifications up over a year ago, if I didn’t remove the listeners first, each time I registered them, they would start to duplicate and cause issues.

---

_[View the full topic](https://forum.ionicframework.com/t/ionic-6-capacitor-push-notification/232175)._
