Hello,
I’m trying to
> make the app run in background even after it gets killed
by the user.
The purpose of using this is to get notification from the server to the app even if its killed.
I googled a lot on this but didn’t get any success.
Kindly help me out on this.
Even if you achieve that, how would the app sync with the server, if ultra power saving mode is switched on ?
only thing app will sync with server is for notification emitted by a socket from the server at a specific time the notification is configured. So, can we make the app run in background even after it gets killed
Facing the same issue. Tried using background mode, but it works only when app is minimized and not killed. If anyone got the solution please help.
Like you want this this is clearly NOT POSSIBLE! The Code you write in js/ts only runs in the WebView and is unaccessable when the App is killed!
If your app is not running, you cannot do anything. Having a background task when the app is killed is not possible. Hence the term “killed”.
Honestly no app store would allow this anyways given the security implications. Imagine having an app that just runs in the background…constantly pinging a server. For sure would sound like a privacy concern and potentially a concern with battery life.
1 Like
Use service method in native android. First of that you need to learn android Java…