I built an ionic android app that utilizes the cordova background mode and pedometer plugins to have the app running in the background. I have heard recently of pedometer apps that continue to count steps even when the app is closed. This contradicts what I know of android closing background apps for battery optimization. Do these pedometer apps that still run when closed really exist and if so how are they accomplishing this?
Asked
Active
Viewed 31 times
0
-
yes .. you need make plugin (Background service) and call it in ionic using javascript bridge see this link for more details https://medium.com/@Codeible/understanding-and-using-services-in-android-background-foreground-services-8130f6bbf2a5#:~:text=A%20Background%20Service%20is%20a,bound%20to%20is%20still%20active. https://medium.com/@sangkhim/build-your-first-cordova-plugin-for-ionic-native-38d29a170145 – Laith Bzour Jul 05 '23 at 23:15