[Interest] QNetworkConfigurationManager::isOnline always returns false on Android 11

Thiago Macieira thiago.macieira at intel.com
Sat Sep 26 18:15:48 CEST 2020


On Saturday, 26 September 2020 08:53:52 PDT ekke wrote:
> Am 26.09.20 um 17:39 schrieb Thiago Macieira:
> > On Friday, 25 September 2020 23:58:26 PDT Alexander Dyagilev wrote:
> >> Hello,
> >> 
> >> Tested with Qt 5.12.9. Any workarounds?
> > 
> > Suggestion: stop trying to check and assume that you are online.
> 
> imagine a mobile app for outpatient services, where a nurse visits
> patients and at each patient has to confirm services done and to send
> vital values and so on...
> 
> while on tour and visiting the patients the device sometimes is online,
> sometimes offline

Ok, stipulated.

> all service items done are written to a queue. queue watches online
> state and always when the device is online items waiting in the queue
> are sent to server

Ok.

> in the evening when all work is done user can only log out if all work
> is sent to server - if not online he/she gets an info "you're not online
> - work items cannot be sent" ...

No. You don't need to know if you're online for that. You need to get the 
confirmation from the server that the server received the data. That completes 
the information loop properly.

> assuming that the device is online won't work in such kind of use-cases,
> pulling also is no good idea

Yes, it is. Just try to connect. If you're offline, then you can't. If you're 
online but there's another network problem, then you can't either.

I don't know what you mean by pulling. Did you mean a push API? I don't see 
how that would be relevant.

> (have some more mobile apps where it's also important always to know the
> online state)

You're online. That's what Qt 6 will tell you.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering





More information about the Interest mailing list