Hello everybody,


I am currently working on a mobile app which has to perform certain background tasks. I have created a Javascript timer which runs every 5 minutes and all the logic is working perfect. There is only one thing; Android is putting the mobile application in some sort of 'idle' mode so all the background tasks will stop working. How do I prevent this? I found out that by sending notifications the app will be activated again but this is a very annoying method. 


Extra information: I am using the Background Mode Plugin (which is working fine).


Thanks in advance!

Can you give us an idea of the type of task you are trying to perform?


Stacey Levine wrote:

Can you give us an idea of the type of task you are trying to perform?



I am trying to fetch the User his location every 5 minutes and the app needs to check if the location is within a certain radius. The logic is working fine except for the fact that the background processes stop working after a couple of minutes 

Amal Raj wrote:

Hi 

Did you check these components on forge 

https://www.outsystems.com/forge/component/1727/backgroundmode-plugin/

https://www.outsystems.com/forge/component/1623/background-location-plugin/


Hello,

Yes I am using both. Do you know if there is any setting within these plugins which can prevent the app going idle/paused?


Solution


Does the above help ?

Solution

Amal Raj wrote:


Does the above help ?

Hello Amal,


I implemented the code and it seems to be working.

Thank you :)