Releases: launchdarkly/android-client-sdk
3.2.1
[3.2.1] - 2022-09-28
Fixed:
- The SDK now detects and cancels any repeating polling task that might have been left over from a previous run of the application. The potential problem was that if an application crashed or otherwise did not shut down cleanly, an "alarm" notification used by the SDK for polling could continue to exist, causing the application to be started again and to keep polling for LaunchDarkly flag data, even though the user intended to shut down the application. With this fix, such an unintended restart could still happen once, but the SDK will detect this condition and stop the notification from continuing to fire. In the future the SDK may be changed more broadly to stop using the AlarmManager API so that such restarts cannot happen at all, but this fix mitigates the problem in the meantime. (#188)
3.2.0
[3.2.0] - 2022-08-23
The purpose of this release is to introduce a new logging facade, com.launchdarkly.logging
, to streamline how logging works in LaunchDarkly Java and Android code.
Previously, the Android SDK always used Timber for logging. This sometimes led to conflicts with an application's separate use of Timber, as described in #88 and #147.
In this release, the default behavior is still to use Timber, but the logging facade can also be configured programmatically to do simple Android logging without Timber, or to forward output to another framework such as java.util.logging
, or to multiple destinations, or to capture output in memory. In a future major version release, the default behavior may be changed so that the SDK does not require Timber as a dependency.
Added:
- In
LDConfig.Builder
, the new methodslogAdapter
,logLevel
, andloggerName
, for the new logging capabilities mentioned above. - New class
LDTimberLogging
for configuring the SDK's Timber integration. - New class
LDAndroidLogging
for configuring the SDK to use the Android logging API without Timber.
3.1.8
[3.1.8] - 2022-08-23
Changed:
- Changed throttling/jitter logic that used
java.util.Random
to usejava.security.SecureRandom
. Even though in this case it is not being used for any cryptographic purpose, but only to produce a pseudo-random delay, static analysis tools may still report every use ofjava.util.Random
as a security risk by default. The purpose of this change is simply to avoid such warnings; it has no practical effect on the behavior of the SDK.
Fixed:
- The map of existing
LDClient
instances was not being cleared after callingclose()
. (#108) - Fixed a bug that caused an
ExecutorService
object to be unnecessarily created whenflush()
was called. - The SDK did not correctly persist versioning information when a flag was deleted or archived. In an edge case where flag updates are received out of order, this could cause a deleted flag to appear to be undeleted.
- Setting
baseUri
orstreamUri
to a URI with a trailing slash could cause requests to fail. Now the SDK works correctly regardless of whether these URIs have a trailing slash or not. - The SDK was including
"anonymous": false
in analytics event data for users where theanonymous
property had not been set at all. In the current user model,"anonymous": false
is subtly different from not setting the property (flag rules referencinganonymous
will only work if it is explicitly set), so the event data should accurately represent this by omitting the property if it was omitted. - Fixed a bug that could cause a NullPointerException when calling
variation
methods, in an edge case where the SDK received inconsistent data of a kind that the LaunchDarkly services would not normally send (an evaluation result with a value but no variation). This should not be possible in practice, but could happen in test scenarios.
3.1.7
3.1.6
[3.1.6] - 2022-08-01
Added:
- CI builds now include the SDK test harness, a standardized contract test suite that validates the SDK's behavior against simulated LaunchDarkly endpoints.
Fixed:
- Deadlock between
Throttler
andConnectivityManager
. (Thanks, res0nance!) - Remove object-level locking in
LDClient
that caused synchronousinit()
s to unnecessarily block other methods, resulting in ANRs.
3.1.5
3.1.4
3.1.3
[3.1.3] - 2022-02-24
Fixed
- Add explicit proguard directives for keeping BroadcastReceivers
- Bump version of git-publish gradle plugin from 3.0.0 to 3.0.1.
3.1.2
[3.1.2] - 2021-12-17
Fixed
- Bump version of gson dependency from 2.8.6 to 2.8.9.
3.1.1
[3.1.1] - 2021-09-03
Fixed
- Removed the
android:allowBackup
tag from the SDK'sAndroidManifest.xml
file to avoid requiring applications to explicitly replace the tag if given a different value. (#138) - Changed the SDK's network detection check to consider network transport over a VPN as a connected state. This fixes an issue where the SDK would prevent network requests on a VPN due to considering the network to be unavailable. (Thanks, lguipeng!)