Introduced a maximum time on attempts to recover the current session, after which a new session will be opened. The default is 15 seconds, but it can be customized with the newly added "SessionRecoveryTimeout" property in ConnectionOptions. This fixes a potential case of permanently unsuccessful recovery, if the <control_link_address> setting were leveraged in a Server cluster and a Server instance happened to leave a cluster and were not automatically restarted.
Fixed a bug in the recently introduced session recovery mechanism triggered by the use of the <control_link_address> setting on the Server, which could have caused feasible recovery attempts to fail.
Fixed a bug in the Stream-Sense mechanism, which was unable to recover to HTTP streaming in case of unavailability of a websocket connection. This could only happen in case of the presence of an old proxy.
Fixed a compatibility issue with Android API level 21, which may have caused TLS connections to fail during the initial handshake. This only affected the "full" version of the library.
Updated the included version of the third-party Netty library. This only regards the "full" version of the library.
Fixed a bug, introduced in version 4.2.0, affecting the interruption of a session on a WebSocket (available in the "full" version of the library). In case of connectivity issues (or cluster affinity issues) the session might have remained open in the background, causing a resource waste.
Modified the constructor of the MpnDevice class, by removing the "senderId" argument, which was not actually used. COMPATIBILITY NOTE: Existing code leveraging the MPN support and using this constructor (instead of the available factory method) needs to be aligned and recompiled.
Discontinued token reuse upon MPN device registration: now a new token is always requested. Previously, the existing token was reused if the application package version had not changed. This better conforms to Android FCM library best usage practices.
Fixed a bug in the recently introduced session recovery mechanism, by which, a sendMessage request issued while a recovery operation was in place, could have never been notified to the listener until the end of the session (at which point an "abort" notification would have been issued to the listener), even in case the recovery was successful.
Fixed possible cases of incorrect cookie handling in old versions of Android (api level 23 and earlier).
Fixed a compatibility issue in the previously added debug log.
Improved internal debug log.
Fixed a bug which, upon particular kinds of network issues and when the "early websocket open" feature was enabled, could have caused the client to abort session establishment or recovery attempts with no notification to the application.
Fixed a bug, introduced in version 3.0, which could have caused the method ItemUpdate.isSnapshot to behave wrongly on subscriptions in which the snapshot was not requested.
Added the error code 21 in onServerError, that can be received upon some failed requests, to inform that not only the current session was not found but it is also likely that the request was routed to the wrong Server instance. Previously, in the same cases, the SDK library would not invoke onServerError and would open a new session instead. COMPATIBILITY NOTE: If using an existing application, you should check how it would handle the new (and unexpected) error code. A reconnection attempt would ensure the previous behavior, although this is no longer the suggested action.
Modified the default value of the "RetryDelay" property from 5000 to 2000 ms. This should help recovering from network outages of a few seconds, typical, for instance, of wifi/mobile network switches.
Extended the recovery mechanism to stalled sessions. Now, when the ReconnectTimeout expires, an attempt to recover the current session will be performed first.
Fixed a bug introduced with version 3.0.0 preventing the connection when the server configuration specifies a control-link address.
Fixed a rare race condition which could have caused the delay of subscription requests issued on a websocket session startup due to a wrong request to the Server.
Fixed a bug which, in a slow client scenario, could have caused the interruption of a polling session due to a wrong request to the Server.
Fixed a race condition, mostly possible in an overloaded client scenario, which could have caused subscription or sendMessage requests to be delayed.
Fixed a harmless bug in the reverse heartbeat mechanism which, upon session startup, could have caused a NullPointerException to be logged on the console.
Fixed the instructions provided in the documentation of setNotificationFormat in the MpnSubscription class.
Extended the scope of error code 41 on the various MPN requests to all issues related with resource unavailability in the Server preventing the operation. Previously, such issues could have caused the whole session to be interrupted.
Added clarifications on licensing matters in the docs.
Introduced the support for Mobile Push Notifications. It consists in
new methods in the LightstreamerClient class together with new dedicated
classes under the "mpn" subpackage. See the API documentation for details.
As a consequence, new dependencies from third-party libraries have been added.
An MPN subscription is backed by a real-time subscription, from which it may take any field value. Unlike the usual real-time subscriptions, MPN subscriptions are persistent: they survive the session and are identified by a permanent, global, unique key provided by the Server at time of activation.
The notifications are managed by third-party services supported by the Server, which determine the notification characteristics and the supported devices.
Restricted the compatibility constraint to Android 4 or later. COMPATIBILITY NOTE: Existing applications can keep running on earlier Android versions as long they don't leverage the MPN support.
Added automatic recovery of sessions upon unexpected socket interruption during
streaming or long polling. Now the library will perform an attempt to resume
the session from the interruption point. The attempt may or may not succeed,
also depending on the Server configuration of the recovery capability.
As a consequence, introduced a new status, namely DISCONNECTED:TRYING-RECOVERY, to inform the application when a recovery attempt is being performed; hence, onStatusChange and getStatus can provide the new status. COMPATIBILITY NOTE: Existing code that uses the status names received via onStatusChange or getStatus may have to be aligned.
Extended the reverse heartbeat mechanism, governed by the "ReverseHeartbeatInterval"
property. Now, it will also allow the Server to detect when a client has abandoned
a session although the socket remains open.
Fixed the reverse heartbeat mechanism, which didn't work at all. Since version 3.0.0, setting a value for the "ReverseHeartbeatInterval" property could have even caused the connection interruption.
Addressed an issue in the "compact" version of the library, which, in particular circumstances (more likely to occur in long polling), could have caused the silent loss of events on the session. Look for "sun.net.http.retryPost" in the Javadoc overview for details.
Added the new Server error code 71 to onServerError and clarified the difference with error code 60.
Fixed the documentation of getServerSocketName, whose behavior has slightly changed since version 3.0.0.
Fixed the documentation of the "ContentLength", "KeepaliveInterval", and "ReverseHeartbeatInterval" properties of ConnectionOptions, to clarify that a zero value is not allowed in the first and it is allowed in the others.
Fixed the javadocs, by removing some class member variables that were not supposed to be documented.
Aligned the documentation to comply with current licensing policies.
Added the method LightstreamerClient.setTrustManagerFactory, which provides a mean to control the way TLS certificates are evaluated, with the possibility to accept untrusted ones.
Fixed a bug that, when under certain circumstances the server is unreachable, caused the client to enter in a tight reconnection loop ignoring the parameter ConnectionOptions.setRetryDelay.
Addressed compatibility issue with Android 8 affecting SSL/TLS WebSocket connections and causing a tight loop of connection attempts.
Fixed an error in the determination of the LIB_VERSION constant of the LightstreamerClient class in the "full" (i.e. non "compact") version; this version description can also be reported by the Server.
Fixed a bug, introduced in version 3, affecting the case of session establishment refusal by the Metadata Adapter (through a CreditsException) and the case of forced destroy (via external requests), when a negative custom error code was supplied. The subsequent invocation to onServerError would carry code 61 (internal error) instead of the specified custom code.
Fixed the reconnection algorithm, which, in the "full" Android client, could have caused a tight reconnection loop in particular conditions when the server is not available.
Added the null annotations (according to JSR 305) in the class files of public classes, to better support library use with Kotlin and any other language which leverages JSR 305. COMPATIBILITY NOTE: Existing code written in Kotlin and similar languages may no longer compile and should be aligned with the new method signatures. No issues are expected for existing Java code.
Fixed a bug introduced in the previous release, as unnecessary encoding of characters in the requests was saved. The bug caused any '+' characters in the requests (for instance, in group/schema names and in client messages) to be handled incorrectly.
Fixed a bug which caused polling on WebSocket to fail. Note that this feature is available, but very rarely used.
Fixed the support for proxies, which could have caused connections to fail in case a public DNS were not available from the client host.
Fixed a bug which affected any unsubscription request issued so early that the corresponding subscription request had not been completed yet. Such unsubscription could have caused onSubscriptionError with code 19 and the item would have been left subscribed to by the session on the Server, yet considered not subscribed to by the library.
Revised the support for cookies:
Improved the efficiency by avoiding unnecessary encoding of characters in the requests (for instance, in group/schema names and in client messages). In particular, non-ascii characters are no longer encoded.
Introduced a configuration property to choose whether multiple instances of LightstreamerClient should use dedicated threads for their internal operations instead of sharing a single one. See the Javadoc comment for the LightstreamerClient class for details.
Fixed spurious entries in the Javadoc of the Subscription class.
Fixed a bug in TLS management for the newly introduced support of WebSockets, whereby, when the EarlyWSOpenEnabled property was true, the WebSocket connections was open without performing the TLS certificate check. However, in case of an untrusted certificate, still no request could be sent to the Server and no session could be opened. Obviously, the bug did not affect the "compact" version of the library.
Improved the management of retries upon unsuccessful control requests.
Introduced the use of WebSockets both for streaming and for subscription
and client message requests, which brings an overall performance improvement.
As a consequence, setForcedTransport now also supports the "WS", "WS-STREAMING", and "WS-POLLING" values and the predisposed setEarlyWSOpenEnabled method is now effective.
Since the use of WebSockets requires a larger memory footprint, an alternative "compact" version of the library, which gives up WebSocket support, is also available via Maven with name ls-android-client-compact.
Replaced the "maxBandwidth" property of the ConnectionOptions bean with two distinct properties: "requestedMaxBandwidth" and the read-only "realMaxBandwidth", so that the setting is made with the former, while the value applied by the Server is only reported by the latter, now including changes during session life. The extension affects the getter and setter names and also the invocations of onPropertyChange on the ClientListener (see the docs for details). COMPATIBILITY NOTE: Custom code using "maxBandwidth" in any of the mentioned forms has to be ported and recompiled. If the property is not used in any form, existing compiled code can still run against the new library.
Introduced a new callback, "onRealMaxFrequency", to the SubscriptionListener, to report the frequency constraint on the subscription as determined by the Server and their changes during subscription life. See the docs for details and special cases. COMPATIBILITY NOTE: Custom code has to be ported, by implementing the new method, and recompiled. Existing compiled code should still run against the new library: invocations to onRealMaxFrequency to the custom listener would cause an exception that would be caught internally.
Introduced a new property, "clientIp", in the ConnectionDetails bean; it is a read-only property with the related getter and keyword for onPropertyChange (see the docs for details).
Completed the implementation of methods whose implementation was only partial. This regards:
Removed a restriction on field names that can be supplied to a Subscription object within a "field list"; names made by numbers are now allowed. Obviously, the final validation on field names is made by the Metadata Adapter.
Fixed a bug on the implementation of disconnect(), whereby an ongoing loop of connection attempt was not interrupted in case of Server down or wrong address.
Revised the sendMessage implementation in the HTTP case, to limit recovery actions
when messages are not to be ordered and a listener is not provided.
Revised sendMessage to accept 0 as a legal value for the "delayTimeout" argument; negative values will now be accepted to mean that the Server default timeout is to be used. COMPATIBILITY NOTE: Existing code using the 5-argument version of sendMessage and supplying 0 as "delayTimeout" must be modified to use -1 instead. Invocations to the 1-argument version don't have to be modified.
Added new error codes 66 and 68 to onServerError, onSubscriptionError, and
onSecondLevelSubscriptionError, to report server-side issues; previously,
upon such problems, the connection was just interrupted.
Added missing error code 60 to onServerError documentation; this error reports server-side licensing limitations.
Removed error code 20 from onSubscriptionError and onSecondLevelSubscriptionError documentation; when a subscription request cannot find the session, the session is just closed and recovered immediately.
Revised the documentation of the possible error codes.
Slightly delayed the availability of the "serverSocketName" property of the ConnectionDetails bean, which was already valued upon session start. COMPATIBILITY NOTE: Custom code using getServerSocketName right after a session start, should ensure that onPropertyChange for "serverSocketName" gets invoked first.
Added the support for non standard unicode names, if supplied as hostnames in the Server's <control_link_address> configuration element.
Removed useless requests to the Server for bandwidth change when the Server is not configured for bandwidth management.
Improved the management of setHttpExtraHeadersOnSessionCreationOnly, when true. Previously, the extra headers (supplied with setHttpExtraHeaders) were still sent, redundantly, on control requests.
Revised the default setting for the "ContentLength" property of ConnectionOptions, to allow the library to set it to the best value.
Clarified in the documentation the meaning of null in setRequestedMaxFrequency and setRequestedBufferSize. Extended setRequestedMaxFrequency to allow the setting also when the subscription is "active" and the current value is null.
Improved the documentation of various methods in regard to the special case
of two-level subscriptions.
Detailed the documentation of the various property getters and setters in regard to the possible values.
Improved the Javadocs, by shortening the concise descriptions of some classes and methods.
Fixed a bug, regarding only subscriptions in COMMAND mode, which caused unchanged fields to be redundantly indicated as changed. The bug didn't affect the returned data values.
Fixed a bug which could have caused onSubscriptionError and onCommandSecondLevelSubscriptionError to report wrong error codes, that is, codes different from the documented ones.
Fixed the documentation of onClearSnapshot, which is only predisposed.
Added meta-information on method argument names for interface classes, so that developer GUIs can take advantage of them.
Clarified the documentation in regard to a few API methods that still have a partial implementation or are just predisposed and not implemented yet.
Changed the names of some properties in the ConnectionOptions bean. To resume:
This affects the getter and setter names and also the invocations of onPropertyChange on the ClientListener. COMPATIBILITY NOTE: Custom code using any of the mentioned properties has to be ported and any related binaries have to be recompiled.
Fixed potential NullPointerException which could be thrown when setting or updating fields and/or items list if logging is enabled at DEBUG level.
Changed the type and behavior of the getConnectTimeout/setConnectTimeout. This setting is now represented as a String in order to accept the "auto" value. If "auto" is specified the value used internally will be chosen (and possibly changed overtime) by the library itself. Note that "auto" is also the new default value.
To check and or modify the current value, a new CurrentConnectTimeout property, with its getter/setter pair in ConnectionOptions, is exposed. COMPATIBILITY NOTE: if the setConnectTimeout method is called by the client code, the given parameter must be modified to be a String. If the getConnectTimeout method is called by the client code its receiving variable must be converted to a String; moreover it is likely that getConnectTimeout calls should be replaced by getCurrentConnectTimeout ones. See the docs for further details.
Prevented reconnection attempts upon wrong answers from the Server.
Fixed an error in the log of the keepalive interval setting.
Fixed the documentation of onServerError and onStatusChange, to specify that onServerError is always preceded, not followed, by onStatusChange with DISCONNECTED.
Revised javadoc formatting style and fixed various typos in the javadocs.
Resorted to an external package for the log support. COMPATIBILITY NOTE: Custom code using the LoggerProvider interface should be revised, based on the new documentation; see setLoggerProvider.
Improved the handling of long polling.
Added missing documentation of setProxy in ConnectionOptions.
Introduced as an improved alternative to the SDK for Android Clients.
The interface offered is completely different, and it is very similar