Thatâs just ignorant, to assume battery will be consumed because a process is running. Youâre making so many assumptions.
A classic approach will be to have a spin-wait model that incorporates a long sleep. So that youâre polling once a minute, once an hour, or even once a day. And each period of activity could be strictly constrained, e.g. poll a folder, etc. Some activities would not even require WiFi/cellular, or activating display. So why would you think there would be a discernible battery drain?
Your main reason is likely because you honestly donât know how to do this properly.
The primary assumption Iâm making, which is based off an admittedly cursory reading of cordova-background-plugin issues, is that while device OS makers have put a great deal of thought into resource management and process scheduling, Cordova (and therefore Ionic, modulo future developments wrt Capacitor) is not in a good position to take advantage of them.
phone will be locked through an app and locked until user done something like swipe, or a different pin then the phone original pin etc⌠how i can do this with ionic ???
Transistorsoftâs Background Fetch is probably what you are looking for as far as sending data. They also have a great background geolocation plugin. That plugin was forked and is the one mentioned above.
Who said that whatsapp load message after open the app? I see whatsapp has services and sometime notification (checking message) has appear when connection refine. And whatsapp never late to load message, when notification comes, the message is already there.
If you ever use windows phone, then i believe that the way whatsapp do was using push notif, then load message when user open app, because almost every time that i open app, the message has not come yet.