cordova-plugin-background-mode icon indicating copy to clipboard operation
cordova-plugin-background-mode copied to clipboard

background mode not working when app's minimized!

Open minh1996bk opened this issue 6 years ago • 4 comments

I'm using background mode to keep my app running in background. it work if i turn off my screen. but when i minize app, my code in webview stop running after 5 min. My code inside platform.ready() : this.backgroundMode.enable();

    this.backgroundMode.overrideBackButton();
    
    this.backgroundMode.excludeFromTaskList();

    cordova.plugins.backgroundMode.disableBatteryOptimizations();
    
    this.backgroundMode.disableWebViewOptimizations();

minh1996bk avatar Jul 04 '19 04:07 minh1996bk

I'm using this plugin https://github.com/boltex/cordova-plugin-powermanagement with backgroundmode to make it working with android 8.0 I don't know if it's enough for android 9.0
P

pimol avatar Jul 04 '19 08:07 pimol

I'm using websocket as core function of my app. I press home button to make app run in background then i turn screen off. after 5 min later, i open my app and i see socket status label is connecting.do your app working in this case. sr for my bad english

minh1996bk avatar Jul 05 '19 02:07 minh1996bk

@minh1996bk Same Issue where with WebSocket

abalad avatar Aug 26 '19 18:08 abalad

Hi, I have the same problem, I even used an app to keep the screen on, but my app is being minijmized from time to time, and that makes the javascript (ajax calls) stop, Can you give me and advice please ?

ilies25 avatar Jun 07 '21 14:06 ilies25