Browser

Latest Update Current Stable Release Next Release Candidate Beta Release Alpha Release
December 4, 2019 1.0.0 1.2.0-rc01 - -

Declaring dependencies

To add a dependency on Browser, 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.browser:browser:1.2.0-rc01"
}

For more information about dependencies, see Add build dependencies.

Version 1.2.0

Version 1.2.0-rc01

December 4, 2019

androidx.browser:browser:1.2.0-rc01 is released. Version 1.2.0-rc01 contains these commits.

Bug fixes

  • Javadoc formatting for code samples was fixed.

Version 1.2.0-beta01

November 20, 2019

androidx.browser:browser:1.2.0-beta01 is released with no changes since 1.2.0-alpha09. Version 1.2.0-beta01 contains these commits.

Version 1.2.0-alpha09

October 23, 2019

androidx.browser:browser:1.2.0-alpha09 is released. Version 1.2.0-alpha09 contains these commits.

New features

  • The Token class can be used to represent the identity of a package, it contains both the package name and the signature of the package’s signing certificate.
    • It is designed to be serialized to a byte[] for persistence.
    • It is used by the TrustedWebActivityService to determine what TWA provider is allowed to connect to it.
    • It is used by the TrustedWebActivityConnectionPool by the TWA provider to determine which packages are valid to connect to.
  • The TokenStore interface is now used by the TrustedWebActivityService to determine which app is allowed to connect to it.
    • It is up to the client to call TokenStore#store, TrustedWebActivityService only loads the Tokens.
  • The TrustedWebActivityServiceConnectionPool (previously TrustedWebActivityServiceConnectionManager) no longer stores the set of verified packages:
    • registerClient and getVerifiedPackages have now been removed.
    • The collection of verified packages is now provided manually to execute (previously connect) and serviceExistsForScope.
  • The TrustedWebActivityService delegates to the overriding class to store the verified provider.
    • setVerifiedProvider has been removed.
    • The client must implement getTokenStore which returns a TokenStore that can be used to store and retrieve a Token.

API changes

  • The TrustedWebActivityServiceConnectionManager class:
    • Is now called TrustedWebActivityServiceConnectionPool.
    • Is now final.
    • Is constructed by the static create method instead of a public constructor.
  • The TrustedWebActivityService class:
    • Has thread annotations on overridable methods.
  • The TrustedWebActivityServiceWrapper class:
    • Is now called TrustedWebActivityServiceConnection.
    • Is now final.
    • Now throws raw RemoteExceptions instead of wrapping them in RuntimeExceptions.
  • The ShareTarget#FileFormField class is now final.
  • The TrustedWebUtils#splashScreensAreSupported method has been renamed to areSplashScreensSupported.
  • The TrustedWebActivityIntentBuilder#getUrl method has been renamed to TrustedWebActivityIntentBuilder#getUri.
  • The SplashScreenParamKey static fields have been prefixed with KEY_.

Version 1.2.0-alpha08

September 18, 2019

androidx.browser:browser:1.2.0-alpha08 is released. Version 1.2.0-alpha08 contains these commits.

New features

  • Introduced new Share Target APIs for Trusted Web Activities. Apps that use Trusted Web Activities can now send data to their Web Share Target, defined by the protocol https://wicg.github.io/web-share-target/level-2/ (aosp/I47b93, aosp/I0ec3e)

API changes

  • Added the callback extraCallbackWithResult to ICustomTabsCallback (aosp/Ic2cc2)
  • Marked some CustomTabsSession method parameters as Nullable or NonNull (aosp/Iec460)
  • TrustedWebActivityIntentBuilder now builds a TrustedWebActivityIntent instead of a raw intent (aosp/I03fb6)

Bug fixes

  • CustomTabsClient now uses the legacy requestPostMessageChannel if needed (aosp/Ibb324)
  • Fixed CustomTabsSessionToken#equals (aosp/I7f249)
  • CustomTabsClient now uses the legacy newSession if possible (aosp/Ie27dc)

External contribution

Version 1.2.0-alpha07

August 7, 2019

androidx.browser:browser:1.2.0-alpha07 is released. The commits included in this version can be found here.

New features

  • Dark Theme

    • Developers can provide theme colors to be used when the device is in dark mode.
    • Developers can also override whether the launched browser should be in dark or light mode.
    • The navigation bar color can be specified for Custom Tabs.
  • Trusted Web Activities

    • The TrustedWebActivityBuilder can be used to easily create and launch Trusted Web Activities.
    • The TrustedWebActivityService and related classes can be used to communicate with the provider - accepting web push notifications for the linked website and displaying them from the client app. This part of the API is liable to change.
  • Custom Tab Session Ids

    • Custom Tabs sessions can now be created with ids, allowing the merging of two sessions launched by the same application with the same id.

API changes

  • Browser Actions related classes and methods have been marked deprecated. Unfortunately, while we had high hopes for the feature, barely anyone ended up using it and only one browser ended up providing support for it. We’re deprecating it to keep the code and the API simple.

Version 1.0.0

Version 1.0.0

September 21, 2018

browser-1.0.0 is released.