-
Notifications
You must be signed in to change notification settings - Fork 113
Description
Hi Adal community!
I'm facing a strange behaviour with an Android app I'm developing.
Basically my app connects to an access point through WiFi (without internet) and I've a scenario in which device has not a mobile network available.
In this scenario my access point has whitelisted all Microsoft endpoints in order to give the possibility to user to login (via AcquireTokenInteractive Request).
Using Android < 10 everything is OK (connection to WiFi is made programmatically) because network is saved to system level, troubles start when using Android 10.
I'm notice that HttpUtil.throwIfNetworkNotAvailable
uses DefaultConnectionService.isConnectionAvailable()
that uses getActiveNetworkInfo()
to check connectivity status but it's deprecated and this check for Android 10 always fails.
I'm stuck because I'm able to perform login via interactive login but this connectivity check is blocking my flow.
I've tested removing this check and then binded process to network and it's working.
There are a better way to fix this or I've to implement this skip manually?
e.g:
private void acquireTokenInteractiveFlow(...,
final boolean skipConnectivityCheck)
if (!skipConnectivityCheck)
HttpUtil.throwIfNetworkNotAvailable(...)
- Expected behavior: Using a WiFi network without internet but all MS endpoints in whitelist I'm able to login via interactive webview.
- Actual behavior: AuthenticationException due ADALError.DEVICE_CONNECTION_IS_NOT_AVAILABLE is throw
- Steps to reproduce the problem:
- Using Android 10 connect to a WiFi network without internet (programmatically), with an ADAL authority whitelisted.
- Call
acquireToken
- Specifications like the version of the library, operating system etc.: Android 10 / Adal 1.16.3
- Relevant logs and traces: ---