To stop simpleServer from closing unnecessarily on Android, we use an already existing method used to lock Apps to phone RAM. By locking Apps to an Android phone ram, the App is given a fair share of your phone ram, and not allowed to close on its own on less you close it yourself.
How To Lock Apps To Phone Memory / Ram
*.Download & Install Xposed Installer
*.Download & Install App Settings.apk (this works as a module for the xposed installer)==> Make sure your phone is rooted, if not Root it Here
==> Run Xposed installer, and click on Framework.
==> Install Update and Reboot your device as prompted.
==> Run Xposed Installer Again
==> Click on Modules and tick App settings. This should enable the App settings option.
==> Now on same Windows, click on App settings and a list of all your installed Apps will be displayed
==> Select the App you wish to lock to RAM. In this case, you will have to select Simple sever from the list.
==> An OFF & ON prompt should come forth, choose ON. And set the followed page as follows;
*.DPI: 150
*.Font Scale: 80
*.Resident: TickSave your settings using the button at the top right corner of the windows and click back to return to Apps list. Did you notice anything?? The SimpleServer is now marked inRedmeaning you are good to go. You can use this same procedure to stop any App from closing on its own.
The SimpleServer App interface will now look a bit smaller than it used to be. So when you notice this, don't panic. As its as a result of the little hack you carried out above. And it doesn't end there, any app you use this method on will have smaller interface just like the SimpleServer.