Search code examples
ionic-frameworkcapacitorionic-vue

Background tasks in Ionic Vue


I have a list of motivational messages from local sqlite db created during application installation. I need to display these messages one at a time anywhere within the user’s screen. As it seems, I need a background task to run the process to display these messages, additionally, I need the messages to display on top of other apps within the user’s device of course after getting a permission from them. I am using Ionic Capacitor, is this something achievable with Ionic Capacitor? Has anyone here ever done something like this before? Are there any plugins you would recommend? Thank you in advance. I already have some starter code for the messages Vue component, if you may want t o see it, I can gladly share it.

I have tried looking out for any plugin that can easily help me achieve this to no avail.


Solution

  • Ionic Capacitor doesn't support creating overlays or displaying content over other apps due to the limitations of the web view that Ionic runs in. You may use native code, but this would need separate development for each platform. Alternatively, consider using push notifications to deliver messages, or schedule local notifications.

    Due to OS limitations, especially with iOS, background processing in Ionic is restricted to maintain device performance and battery life.

    Hope this helps.