I am developing an Android Xamarin Forms app which connects to a wifi programmatically.
I used ConnectivityManager
and NetworkCallback
classes to achieve this.
Everything works fine, I can connect to the wifi successfully, pressing the "Connect" (Connetti) button of the dialog shown below.
Sometimes the required network is not detected and, a after a certain interval of seconds, it is shown another dialog. See below.
If the user taps on the "Cancel" (Cancella) button of this second dialog, the OnUnavailable method of the NetworkCallback
is never called and I am not able to detect when the user chooses to dismiss it.
Anyone knows how to intercept the cancel tap of this second dialog?