ThanosFisherman / WifiUtils

Easily Connect to WiFi Networks
Apache License 2.0
731 stars 188 forks source link

Android 10 - Something came up. The application has cancelled the request to choose a device. #113

Open mhdshah opened 3 years ago

mhdshah commented 3 years ago

After 15 seconds of the timeout, the error message is shown "Something came up. The application has cancelled the request to choose a device" in the app. How to resolve this issue?

private fun connectHidden(context: Context) { WifiUtils.withContext(context) .connectWith(textview_ssid.text.toString(), textview_password.text.toString(),TypeEnum.EAP) .setTimeout(15000) .onConnectionResult(object : ConnectionSuccessListener { override fun success() { Toast.makeText(context, "SUCCESS!", Toast.LENGTH_SHORT).show() }

                override fun failed(errorCode: ConnectionErrorCode) {
                    Toast.makeText(context, "EPIC FAIL!$errorCode", Toast.LENGTH_SHORT).show()
                }
            })
            .start()
}
fernando-s97 commented 2 years ago

AFAIK that's not an issue. That's how Android works after the timeout time is reached