android icon indicating copy to clipboard operation
android copied to clipboard

Network Changed Events

Open deisi opened this issue 5 years ago • 1 comments

The android docs say:

The app cannot attempt to connect if the network connection changes because it is not possible to receive the network change event.

And so has it been posted a couple of times in this bugtacker. Now I'm not an android dev, so I might just be wrong, but from browsing the android developer reference, I don't think this is true. I looked at:

NETWORK_STATE_CHANGED_ACTION

This brought me to: NetworkInfo where they indeed talk about some deprecation in API level 28 and I assume this is what was meant by not being able to detect the netowrk state event, however there is also an alternative given:

NetworkCallback

And if I understand this correctly, you can register you own callback functions, that get called on network events.

deisi avatar Dec 22 '18 20:12 deisi

This also ties in with resetting the sendmessage queue wait timeout on config change as well as network change.

growse avatar Aug 31 '21 14:08 growse