angeloraso / capacitor-background-mode

15 stars 11 forks source link

Maintaining app activity even after it's cleared from recent apps on Android #2

Open seikosantana opened 1 year ago

seikosantana commented 1 year ago

Is there a way to keep the application active although it is cleared from recent apps? For example, WhatsApp, although is cleared from recent apps, it still receive messages and media. Telegram also does that. Online shop apps also does that. KDE connect, still have persistent notification (i dont know if it is the right word) and still listens for network discovery although cleared from recent apps.

I need to keep my websocket connections alive and process messages, even if the app is closed from recent apps if possible. Is there a way or workaround for this?

angeloraso commented 1 year ago

Hi there!

I also have to solve the same problem. So far, this plugin is the closest I've come to finding a solution. I hope it helps you in the meantime.

If you discover any additional solutions during your search, I would greatly appreciate it if you could share them in this issue so we can update the plugin.

seikosantana commented 1 year ago

If you discover any additional solutions during your search, I would greatly appreciate it if you could share them in this issue so we can update the plugin.

I will. However I don't have much experience with native android development or good understanding of Capacitor and interops.

I wonder if it is possible to have capacitor executing without starting any activity.