Reconnection after sleep

I find that if Home Remote is active on my Android tablet and the tablet display goes to sleep. Upon waking Home Remote has trouble reconnecting and the condition persists for an extended period. At that point if I minimize Home Remote and then immediately maximize it then it reconnects.

Do you see any toasts messages when you resume the app?

In particular, does it ever show “Waiting to connect”?

Yes, I do see that toast message for a few seconds. The problem seems to be intermittent but it happens more often than not. Not sure if the amount of time of inactivity is a factor…

If the network is unavailable after waking from sleep you’ll see “Waiting to connect”. Then once the network comes back online you’ll see “Reconnecting”.

It also seems to revert to my opening page upon waking. I noticed today I was on my kodi page and the display turned off. When I turned it back on it was on my main page and I get the toast but I notice that all of my Vera data, temperature, watts used, etc has not populated leaving the fields blank. Then when I minimize and maximize I am back at the Kodi page and it has a connection at that point.

Yeah seems to sit there after the toast and never resolves (waiting more than a minute) unless I intervene by minimizing and maximizing at which point it connects immediately.

When you see “Waiting to Connect” it aborts the standard app resume method because your network adapter was offline. It then waits for notification from the adapter to come online. What’s likely happening is that either the event from the OS isn’t getting triggered or the Home Remote is just missing it. There have been reports of issues very similar to this. I need to reexamine that code & maybe create a timer that periodically checks the network state instead of relying on this system event.

Why don’t you set the wifi to always on?

Android settings>WiFi>advanced>keep wifi on during sleep - always

I don’t have a setting to keep wifi on. I found a setting to keep apps from going to sleep which I added Home Remote to but it did not help. A refresh from minimize to maximize is the only thing that works. The problem only happens when the screen in off for an extended time of a few minutes.

Can you upgrade your tablet to & see if this is still an issue?

I made a change so that if the network is offline it’ll wait 10 seconds & force a reconnect if it has to. It’ll still listen for events from the network adapter but it’s no longer 100% dependent on those. I think that was your issue.

What you’ll likely see now after resuming from sleep is “Waiting to connect” followed by “Forcing reconnect”.

Yes, I am getting both toasts, and connects successfully. Total time from resume about 8-10 seconds, thanks.

Any resolve to this? I’ve been getting the “Waiting to connect” followed by “Forcing reconnect” after the tablet screen has been off for a while and just living with it, but it’s finally got to me. Like Tarkus said there’s no option to force WiFi to stay on in tablet settings, just apps not to put to sleep.
I can think of 2 possible solutions, 1 would be something to make HR ping the network every x seconds or a separate app that does this (outside of HR)
Tablet Home Remote Pro Project made with Home Remote Designer
Tarkus, did you find a work around

The “forcing reconnect” was the last fix that was implemented. There is about a 8 second delay but it never really bothered me. I am not sure about IOS but the Android OS has a mind of it own when it comes to disconnecting apps to optimize resources. There are 3rd party apps that are suppose to keep apps alive but I never tried them. Ping may wiork.