Android RDP client disconnect automatically after two minutes.
Closed this issue · 4 comments
Hi,
I have compile android client for rdp , i am facing issue where rdp client got disconnect automatically after 2-3 minutes when device is locked.
it work fine if we try with device connected with system with debug mode.
please let me know any solution for same.
Hi there, this sounds like a power management issue on your device. Depending on the device, you can add aRDP to the list of apps to be excluded from battery optimization. Please look up how to do that on your specific device.
I was recently reminded of questions around making the application survive longer in the background. On a modern Android, the list of steps includes but may not be limited to:
-
Go to Settings->Apps, and find the application (bVNC, aRDP, aSPICE, Opaque, etc) whichever is the app you want to keep from being killed
-
Scroll down to where it says Battery and tap/click that
-
Set it to "Unrestricted"
-
Next steps vary by device. On a Samsung, you can go to Settings->Battery->Background usage limits->Never auto sleeping apps->Hit the plus button, find and select whichever app you want (bVNC, aRDP, aSPICE, Opaque, etc.)
-
Another thing you can try in case you don't mind installing AccuBattery is to disable optimization for the app
-
Install AccuBattery
-
Once you have it, you can go to Settings->Battery optimization->Open power optimization settings->Change to show All Apps->Toggle the button next to the app you want to disable optimization for to the OFF position (bVNC, aRDP, aSPICE, Opaque, etc.)
Does that help?
Hi, yes we have tried with "Unrestricted" option, we haven't tried with step 4-5-6-7.
let me check that and get back to you.
thanks
@parth-alphabyte please comment if this is still an issue, closing otherwise.