-
|
Is it safe to use @capawesome-team/capacitor-android-foreground-service on Android to finish a task after exiting the app? I am asking since @capawesome/capacitor-background-task is meant for that but it is not implemented on Android and @robingenz mention this in the following comment ionic-team/capacitor#3032 (comment) that it should be ok to do that. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Not really. The Foreground Service plugin simply starts a foreground service. This can be helpful in some situations, but if you want to make sure that your code continues to run, you have to run it natively in the foreground service. We do this in the Bluetooth Low Energy plugin, for example, to ensure that connections are maintained in the background. No, unfortunately the blog post does not exist yet. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @robingenz ! |
Beta Was this translation helpful? Give feedback.
Not really. The Foreground Service plugin simply starts a foreground service. This can be helpful in some situations, but if you want to make sure that your code continues to run, you have to run it natively in the foreground service. We do this in the Bluetooth Low Energy plugin, for example, to ensure that connections are maintained in the background.
No, unfortunately the blog post does not exist yet.