phonetodesktop
phonetodesktop copied to clipboard
handle offline more gracefully
Hello Humberto, I use phone2desktop offline: i read articles in Google Play Newsstand offline, as Newsstand can download articles at night in the background so you have news on your phone in the morning on the way to the office even without mobile data subscription. Some articles have videos which are enjoyable on the big screen or other stuff, like large charts, etc. These i would like to read on my desktop computer, so i would like to send them to phone2desktop while i am on my way and offline.
Now, the app, when offline and gets a shared link, opens in the foreground and asks which google account would like to use. I only have one account. As i get it, the app would like to connect to google, and when failed, it just opens the exact same dialog as i would just mistype my google account settings, asking for the right google account settings it should use. I can close these dialogs and the sent link is stored in the Wait List, so no major problem here, but the button presses should be minimized.
You should check whether the entire phone is offline - i guess there is an official android-way to do this, if not, and you cannot check network interfaces in a standard way, maybe ping 8.8.8.8 with one packet with a timeout of 3 seconds as a last resort, but that's a horrible workaround. If the user is offline, do not try to connect to google, just store the text in the already existing Wait List.
And one additional thing is needed to this gracefully work, and i dont know if it is working whis way already: every time the user sends a new text, check if there is anything in the WaitList, and send all of them too. You can also listen to network interface changes, but that would be a plus.
Thank you
Hi, thank you for the detailed description.
I've recently changed some internals on how to handle the data sending, and overlooked the offline usage. Now I looked at the code and just saw that the current code do not check for internet connection as the old did. This will be corrected soon.
About your suggestion on auto-sending the WaitList, that's a great solution for a problem I knew of, but never had really thought about. Thank you very much.