Latest Update Current Stable Release Next Release Candidate Beta Release Alpha Release
October 9, 2019 1.0.0 - - -

Declaring dependencies

To add a dependency on Futures, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

dependencies {
    implementation "androidx.concurrent:concurrent-futures:1.0.0"

For more information about dependencies, see Add Build Dependencies.

Version 1.0.0

Version 1.0.0

October 9, 2019

androidx.concurrent:concurrent-futures:1.0.0 is released. Version 1.0.0 contains these commits.

Important features of 1.0.0

androidx.concurrent:concurrent-futures:1.0.0 provides CallbackToFutureAdapterclass, a minimalistic utility that allows to wrap callback based code and return instances of ListenableFuture. It is useful for libraries that would like to expose asynchronous operations in their java APIs in a more elegant way than custom callbacks, but don’t do enough multithreading heavy-lifting to take a dependency on full guava or rx java due to library size concerns.

Version 1.0.0-rc01

August 7, 2019

androidx.concurrent:concurrent-futures:1.0.0-rc01 is released with no changes from 1.0.0-beta01. The commits included in this version can be found here.

Concurrent-ListenableFuture Version 1.0.0-beta01

May 30th, 2019

androidx.concurrent:concurrent-listenablefuture:1.0.0-beta01 and androidx.concurrent:concurrent-listenablefuture-callback:1.0.0-beta01 are released. The commits included in this version can be found here.

These libraries provide a standalone equivalent to Guava’s ListenableFuture interface and an adapter for converting callbacks.

The previously-released androidx.concurrent:concurrent-futures artifact, which provided a similar adapter and included the artifact, may be problematic for developers using toolchains -- such as Android Gradle Plugin 3.4.0 -- with strict dependency resolution matching. Developers who do not rely on the full Guava library are advised to switch to androidx.concurrent:concurrent-listenablefuture-callback.

Version 1.0.0-beta01

May 7, 2019

androidx.concurrent:concurrent-futures:1.0.0-beta01 is released. The commits included in this version can be found here.

API changes

  • ResolvableFuture and AbstractResolvableFuture were hidden from public api in favor CallbackToFutureAdapter that provides safer API.

Version 1.0.0-alpha03

December 17, 2018

androidx.concurrent:concurrent-futures 1.0.0-alpha03 is released.

New features

  • CallbackToFutureAdapter was introduced. It’s a new, safer API to wrap a callback driven API into ListenableFuture. Prefer it over using ResolvableFuture.