Tuesday, December 6, 2016

ram - Bypass memory manager; keep app alive


At my work we all have Android devices which are used to dispatch jobs to us. It uses a web-app accessible through any web browser. When a new job arrives we are notified with an audible alert. However, because of the way Android handles the memory, it often "sleeps" (don't know the proper terminology) the web browser so if we get a new job through, we aren't notified unless we manually re-open the web browser to "wake" it.


Is there any workarounds for this issue?


Cheers



Answer



Presumably, the device is using wifi to access the internet - it might be worth a shot to try this:




  • Settings > Wifi

  • Hit on Menu to bring up Advanced

  • Tap on that menu option

  • Keep Wifi on during sleep, check that, make sure its set to Never


In that way when the device goes to sleep, wifi is still active and running and the web app should still work and



When a new job arrives we are notified with an audible alert



Edit



The above answer is not the correct answer, rather from the comments below, this is definitely the one, in which I quote,.



Maybe, the approach to managing the jobs is done the wrong way, especially in context of Android - a custom app that has a service using a partial wake-lock to "ping" checking on jobs, send an event to the app and the app wakes up. IMHO, a browser is not the right tool for the requirements in your case.



In short, there is nothing that can be done to keep the web-browser "alive" while the device is sleeping, as Android, behind the scenes, when the kernel is not in sleep state, is tracking what apps are running, and depending on power and memory constraints, especially in the case of a web-browser page, (if it has a lot of styles, the more elaborate the page, the more resources hogged up as a result, especially if it has a lot of Javascript behind the page) this could be the job for the kernel to shoot it down and eject it from memory hence not reliable route to take.


TL;DR: A proper application instead of just web-browser will resolve the OP's problem.


Off-topic: There was a piece covered by the technology section under the BBC news in respect to mobile web browsing and how it can affect the battery due to the way web pages are designed, rather, they were designed incorrectly for the mobile platform, too much styles, too much scripting, not to mention Flash as well, they all had adverse affect on how Android displays/renders the page which in turn meant a lot of CPU cycles consumed to do just that.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...