# How to create dynamic persistent notification thingy

**URL:** <https://forum.ionicframework.com/t/how-to-create-dynamic-persistent-notification-thingy/121762>\
**Category:** ionic-v3\
**Created:** [February 17, 2018, 6:26am UTC](https://forum.ionicframework.com/t/how-to-create-dynamic-persistent-notification-thingy/121762 "2018-02-17T06:26:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![beck24](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/beck24/32/112174_2.png) [@beck24](https://forum.ionicframework.com/u/beck24)\
**Post date:** [February 17, 2018, 6:26am UTC](https://forum.ionicframework.com/t/how-to-create-dynamic-persistent-notification-thingy/121762/1 "2018-02-17T06:26:11Z")

</div>

I think half the problem is I don’t even know what to call it. A good example is on MapMyWalk, when you are tracking a walk it has a section in the push-notifications area that is persistent, and tracks your time/distance regardless of whether the app is active or in the background, and will do so until you interact with it to pause or clear it.

Pics of what I’m talking about:

![Screenshot_20180216-221303](https://global.discourse-cdn.com/ionicframework/original/3X/6/5/65e3fb6cc1e2792dcd3c9e6e0b0d745cf64a0801.png)

 ![Screenshot_20180216-221318](https://global.discourse-cdn.com/ionicframework/original/3X/3/f/3f718043dfc9e37ac63d372e03a6e7f0e832b303.jpg)

Can anyone point me in the right direction please?

---

<div class="post-metadata">

**Author:** ![AaronSterling](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@AaronSterling](https://forum.ionicframework.com/u/AaronSterling)\
**Post date:** [February 17, 2018, 8:57am UTC](https://forum.ionicframework.com/t/how-to-create-dynamic-persistent-notification-thingy/121762/2 "2018-02-17T08:57:24Z")

</div>

> [@beck24](#):
>
> regardless of whether the app is active or in the background

This might be hard to do with browser-only programming. I don’t know how to do it, though other people here might have better ideas. But I’d suggest you research native plugins, including ones that aren’t compatible with Ionic, like React Native and NativeScript plugins.

---

<div class="post-metadata">

**Author:** ![Nexi](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/nexi/32/117290_2.png) [@Nexi](https://forum.ionicframework.com/u/Nexi)\
**Post date:** [February 17, 2018, 9:07am UTC](https://forum.ionicframework.com/t/how-to-create-dynamic-persistent-notification-thingy/121762/3 "2018-02-17T09:07:43Z")

</div>

I think these kind of notifications are very different in implementation depending on the operating system you are running. If this is the core feature of your app, maybe solving this with react native, nativescript or native development would be a better approach.

---

<div class="post-metadata">

**Author:** ![beck24](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/beck24/32/112174_2.png) [@beck24](https://forum.ionicframework.com/u/beck24)\
**Post date:** [February 17, 2018, 10:05am UTC](https://forum.ionicframework.com/t/how-to-create-dynamic-persistent-notification-thingy/121762/4 "2018-02-17T10:05:09Z")

</div>

Well, it looks like this might be able to be achieved with the Local Notifications plugin - [https://github.com/katzer/cordova-plugin-local-notifications](https://github.com/katzer/cordova-plugin-local-notifications)

There is an ionic native wrapper for it, but it doesn’t include all of the functions of this plugin that would be required to have things update and control in-notification UI. So I’ll have the minor inconvenience of using the plugin the “old” way, but that’s fine. Better than not being possible at all or having to change approaches altogether.

---

<div class="post-metadata">

**Author:** ![hanigb](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@hanigb](https://forum.ionicframework.com/u/hanigb)\
**Post date:** [February 19, 2019, 2:55pm UTC](https://forum.ionicframework.com/t/how-to-create-dynamic-persistent-notification-thingy/121762/5 "2019-02-19T14:55:36Z")

</div>

Hey, were you able to persist the notification using ionic’s local notification?

---

<div class="post-metadata">

**Author:** ![beck24](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/beck24/32/112174_2.png) [@beck24](https://forum.ionicframework.com/u/beck24)\
**Post date:** [February 19, 2019, 5:11pm UTC](https://forum.ionicframework.com/t/how-to-create-dynamic-persistent-notification-thingy/121762/6 "2019-02-19T17:11:48Z")

</div>

Yes I was using the plugin I listed above, but not using the native wrapper, I had to call the plugin API directly from the window var as the wrapper didn’t give access to all of the functionality.

---

<div class="post-metadata">

**Author:** ![hanigb](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@hanigb](https://forum.ionicframework.com/u/hanigb)\
**Post date:** [February 19, 2019, 5:43pm UTC](https://forum.ionicframework.com/t/how-to-create-dynamic-persistent-notification-thingy/121762/7 "2019-02-19T17:43:31Z")

</div>

Thanks for the reply. Can you please share your code? I’m trying to implement the same thing.

---

<div class="post-metadata">

**Author:** ![beck24](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/beck24/32/112174_2.png) [@beck24](https://forum.ionicframework.com/u/beck24)\
**Post date:** [February 20, 2019, 1:02am UTC](https://forum.ionicframework.com/t/how-to-create-dynamic-persistent-notification-thingy/121762/8 "2019-02-20T01:02:48Z")

</div>

Sorry I can’t, mostly because I don’t know where it is, but I do know it’s possible using that plugin. Good luck!

---

<div class="post-metadata">

**Author:** ![Boogiedasx](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/boogiedasx/32/121241_2.png) [@Boogiedasx](https://forum.ionicframework.com/u/Boogiedasx)\
**Post date:** [May 14, 2019, 7:52am UTC](https://forum.ionicframework.com/t/how-to-create-dynamic-persistent-notification-thingy/121762/9 "2019-05-14T07:52:20Z")

</div>

I had the same issue and i used the local notification plugin.

```auto
Notification() {
    this.localNotifications.schedule({
      id: 22,
      title: 'App is Open',
      text: 'My Recurring Notification',
      sound: null,
      sticky: true,
      trigger: { every: ELocalNotificationTriggerUnit.SECOND }
    });
  }

```

Please take note of the **sound option** and the **sticky option.** By default there is sound and sticky is set to false. This will solve your issue.  
Hope it is what you wanted. 😉

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:50pm UTC](https://forum.ionicframework.com/t/how-to-create-dynamic-persistent-notification-thingy/121762/10 "2021-07-19T21:50:15Z")

</div>

Closed on July 19, 2021, 9:50pm UTC


