-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Is this a support request?
No
Describe the bug
In SDK 3.6.0, LDClient.get().connectionInformation will get updated with a new lastSuccessfulConnection value after identifying to a different user, but not in 5.0.0.
To reproduce
- init
LDClientwithldContext1and register aLDStatusListenerLDClient.init(context, config, ldContext1, 3) LDClient.get().registerStatusListener(statusListener) - switch to
ldContext2:LDClient.get().identify(ldContext2) LDClient.get().connectionInformationdoesn't get updated andLDStatusListener.onConnectionModeChangeddoesn't get triggered.
Expected behavior
LDClient.get().connectionInformation should be updated with a new lastSuccessfulConnection value and LDStatusListener.onConnectionModeChanged` should be triggered.
Logs
None.
SDK version
5.0.0
Language version, developer tools
Android Kotlin, API 34
OS/platform
Android 13
Additional context
I have checked the source code of ConnectivityManager.setStatusand noticed that LastSuccessfulConnection value won't be updated if the ConnectionMode doesn't change. I think the connection information should be updated in this case given the LDContext changed. But feel free to close this out if you don't think so.