M
M
marmuff2020-02-13 11:07:44
Java
marmuff, 2020-02-13 11:07:44

Why isn't CONNECTIVITY_CHANGE called when connecting to Wi-Fi?

There is a fragment in which there is a connection to Wi-Fi. After connecting to a Wi-Fi network, a request is sent to the local network for authorization in the MRP (Wi-Fi user registration module).
If Mobile Data is disabled, then everything works as it should, but if Mobile Data is enabled, then CONNECTIVITY_CHANGE (which is tied to sending a request) is not called, and the detailedState of the manager returns the DISCONNECTED status.
Why is this happening and how can it be overcome?

PS There was an idea to disable Mobile Data, but I constantly catch Security Exception despite the granted rights - judging by the documentation, only system applications are allowed to manage this parameter.
PPS Connecting to Wi-Fi occurs, but the connection change event is not called.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question