aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • Programming

Jetpack Compose Accompanist — An FAQ.

  • aster.cloud
  • August 24, 2022
  • 6 minute read

Accompanist is a group of libraries that aim to supplement Jetpack Compose with features that are commonly required by developers but not yet officially supported in Jetpack Compose AndroidX libraries.

Accompanist is a labs-like environment for new Compose APIs. We use it to help fill known gaps in the Compose toolkit, experiment with new APIs and to gather insight into the development experience of developing a Compose library. The goal of Accompanist is to not exist. We want to upstream the libraries into the official toolkit, at which point they will be deprecated and removed from Accompanist.


Partner with aster.cloud
for your next big idea.
Let us know here.



From our partners:

CITI.IO :: Business. Institutions. Society. Global Political Economy.
CYBERPOGO.COM :: For the Arts, Sciences, and Technology.
DADAHACKS.COM :: Parenting For The Rest Of Us.
ZEDISTA.COM :: Entertainment. Sports. Culture. Escape.
TAKUMAKU.COM :: For The Hearth And Home.
ASTER.CLOUD :: From The Cloud And Beyond.
LIWAIWAI.COM :: Intelligence, Inside and Outside.
GLOBALCLOUDPLATFORMS.COM :: For The World's Computing Needs.
FIREGULAMAN.COM :: For The Fire In The Belly Of The Coder.
ASTERCASTER.COM :: Supra Astra. Beyond The Stars.
BARTDAY.COM :: Prosperity For Everyone.

Currently in Accompanist you can find libraries for Flow Layouts, Pager, Navigation Transitions, Swipe Refresh and more.

We frequently get asked a lot of questions about this library and so thought we could write a post to answer some of the most asked Accompanist questions.

Why does Accompanist exist?

A major reason for Accompanist’s existence is the fact that AndroidX does not allow experimental API usage across different modules. There were features we knew we could develop that wouldn’t be allowed in AndroidX. For example, navigation transitions require some experimental animation APIs so cannot be built within navigation-compose but can be built in Accompanist.

For standalone features, you might think, why not just mark the APIs as Experimental in AndroidX? When we add an experimental API to AndroidX, we are confident that the feature will exist in some form but possibly the API will change shape. We also try to have them out of Experimental as fast as possible, we know this doesn’t always happen but that is the goal. When we need them to be longer lasting as experimental or aren’t sure the feature makes sense, Accompanist is where they live.

This table summarizes the different rules that apply to different API locations. These rules are further detailed later in the post as well.

|| Accompanist | @Experimental AndroidX | AndroidX |
|---|---|---|---|
| **Cross module experimental API use** | ✅ | ❌ | ❌ |
| **Binary compatibility** | ❌ | ❌ | ✅ |
| **API commitment** | ❌ | ✔️ We don’t guarantee we will commit to the exact API shape, but we are confident it will exist in some form. | ✅ | 
| **Time to stable** | Accompanist API shapes generally become stable quite quickly but we don’t guarantee it won’t change. Eventually we want to upstream them to AndroidX at which point the API will most likely change. More details below. | Our goal is for them to become stable as fast as possible, this hasn’t always been the case but we are endeavouring to improve this. | APIs can only be changed during alpha. |

The goal of Accompanist is to eventually not exist, that as the AndroidX Compose libraries mature & stabilize, all functionality is upstreamed.

Read More  Giving Your Legacy Applications An API Facelift

History

Another major part of the reason Accompanist exists is history. Accompanist was initially developed by Chris Banes and the Compose team during the early days of Compose. The Compose team were developing the Compose samples and as Compose was still in very early development, there were a lot of gaps in the feature set they required. Both from Compose itself but also from a lack of early support by other libraries. The team wrote a lot of code to make the apps work. Accompanist was created as a place to release this code for others to use. The first ever Accompanist library was a Coil wrapper for loading images asynchronously. Window insets handling was added next, followed by AppCompat theme adapter and then in 0.7.0 a further 4 libraries were added. Pager, Pager Indicators, System UI Controller and Flow Layouts. This was also when the library was moved from Chris’s personal account to an official Google library and the package name was changed from dev.chrisbanes.accompanist to com.google.accompanist accordingly. By this point, multiple members of the Compose team and the community were working on and contributing to the library and it grew from there.

Currently we have 12 active libraries and 1 deprecated library (Insets as it has been upstreamed) in Accompanist. Our goal is to take the most used features from Accompanist and upstream them into the main Compose libraries. This was originally successfully done with the first Accompanist library, Coil and then was subsequently done with Insets to Compose Foundation. We will be ramping up our upstreaming efforts over the next few Compose releases, APIs might change during upstreaming but we are committed to providing an easy migration path for all users of Accompanist. With the updating of the Compose Roadmap you can see, the next API that is being upstreamed is Flow Layout.

Read More  FHIR SDK For Android Developers

What is upstreaming?

The main Compose libraries are developed in AndroidX, our open source repository of Android libraries. This group of libraries is known as Jetpack. Accompanist however is developed separately from the main Compose libraries. When we talk about “upstreaming”, we mean to move the development from Accompanist to the main Compose libraries as an official feature.

Why does it live in GitHub and not AndroidX?

Accompanist is developed on GitHub, in the open. The main reason for this is just history, as stated above. What started as a library developed by one author, grew and turned into a collection of libraries developed by multiple authors. There are some important advantages and reasons it remains on GitHub however.

AndroidX Experimental APIs

As detailed above, AndroidX does not allow cross module experimental APIs. This means, Compose Navigation wouldn’t be able to use the experimental Compose Animation APIs that make navigation transitions possible. Bottom Sheet Navigator wouldn’t be able to use the experimental Material APIs, and so on. As these are features we know the community needs, developing them in Accompanist is ideal. It allows us to get the feature out to developers without having to wait for the version of Compose that removes the experimental annotation.

Binary Compatibility

AndroidX also has strict binary compatibility rules that make changing APIs difficult without bumping major version numbers. These rules exist for a good reason, as APIs changing all the time would make developing with them a burden. Accompanist tries to not change the API structure drastically between releases but does not guarantee it. When we release an API in AndroidX, we might change it but our hope is we don’t have to. In cases where we aren’t sure about an API, we mark it as experimental. In Accompanist we are free to experiment even more which is great for when we aren’t sure about something without community feedback.

Community Contributions

AndroidX has quite a steep onboarding path before your first contribution, it is also difficult to build and run locally. GitHub allows for much easier community contributions, which we encourage. Because we develop in a system already familiar to developers, we get a lot more contributions than we would otherwise, for example Navigation Material was developed by Jossi Wolf before he joined Google!

Read More  Boost The Security Of Your App With The Nonce Field Of The Play Integrity API

Insight into the Compose experience

Developing on GitHub gives us valuable insight into what issues external developers face. By just staying in AndroidX, we often miss issues that seem obvious to external developers. By developing in GitHub where most other external libraries are developed, we spot issues much earlier.

Is Accompanist safe to use in production?

We believe it is! Accompanist is used by just under 30% of apps that use Compose on the Play Store and is still growing. It is also used by the Play Store app itself, and several other Google apps. Accompanist is no different to any other library you might import into your app. We make every effort to maintain it, fix bugs and stay on top of issues. You should always review the source code yourself to see if you are happy with it before adding it to your app, the same as any other library you use.

Is it going to just disappear tomorrow?

Our goal is to upstream the most used features into the main Compose library once we can, and we are going to be doing that with more libraries soon. We won’t just instantly remove them from Accompanist though. Any time a library is upstreamed, we keep a deprecated version of it in Accompanist for at least one stable release of Compose. We will also provide a migration guide or @ReplaceWith annotations to make moving from the Accompanist version, to the official version easy.

Do you accept new features/libraries from the community?

Without a Google owner working with you, no, we do not anymore. Now that Compose is out and stable, we want the library ecosystem to grow! We don’t want every library ending up in Accompanist instead, this is just confusing for developers. We would love for you to release your feature as a library of its own. If you do think your library makes sense in Accompanist, please open an issue first to discuss with us and we may be able to find an owner to work with you.

We definitely accept and encourage bug fixes and improvements to the existing libraries. If you have a large contribution, like any open source repository, it is always best to reach out to us via GitHub issues, to check if we can support its inclusion.

Will you be releasing more Accompanist libraries?

There was one just released to help with adaptive layouts, but that is the only new library planned at the moment. Separately to Accompanist, we have also published and are developing Horologist to help in a similar way with Compose for Wear.

We know having a separate library outside of AndroidX is confusing for developers and creates extra work during a migration though so we only want to add new libraries to Accompanist where there is a clear path to upstreaming and the experimentation in Accompanist is clearly required.

By Ben Trengrove
Source Medium


For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

aster.cloud

Related Topics
  • Accompanist
  • Android
  • AndroidX
  • Jetpack Compose
You May Also Like
View Post
  • Architecture
  • Data
  • Engineering
  • People
  • Programming
  • Software Engineering
  • Technology
  • Work & Jobs

Predictions: Top 25 Careers Likely In High Demand In The Future

  • June 6, 2023
View Post
  • Programming
  • Software Engineering
  • Technology

Build a Python App to Alert You When Asteroids Are Close to Earth

  • May 22, 2023
View Post
  • Programming

Illuminating Interactions: Visual State In Jetpack Compose

  • May 20, 2023
View Post
  • Computing
  • Data
  • Programming
  • Software
  • Software Engineering

The Top 10 Data Interchange Or Data Exchange Format Used Today

  • May 11, 2023
View Post
  • Architecture
  • Programming
  • Public Cloud

From Receipts To Riches: Save Money W/ Google Cloud & Supermarket Bills – Part 1

  • May 8, 2023
View Post
  • Programming
  • Public Cloud

3 New Ways To Authorize Users To Your Private Workloads On Cloud Run

  • May 4, 2023
View Post
  • Programming
  • Public Cloud

Buffer HTTP Requests With Cloud Tasks

  • May 4, 2023
View Post
  • Programming
  • Public Cloud
  • Software
  • Software Engineering

Learn About Google Cloud’s Updated Renderer For The Maps SDK For Android

  • May 4, 2023

Stay Connected!
LATEST
  • 1
    Pure Accelerate 2025: All the news and updates live from Las Vegas
    • June 18, 2025
  • 2
    ‘This was a very purposeful strategy’: Pure Storage unveils Enterprise Data Cloud in bid to unify data storage, management
    • June 18, 2025
  • What is cloud bursting?
    • June 18, 2025
  • 4
    There’s a ‘cloud reset’ underway, and VMware Cloud Foundation 9.0 is a chance for Broadcom to pounce on it
    • June 17, 2025
  • What is confidential computing?
    • June 17, 2025
  • Oracle adds xAI Grok models to OCI
    • June 17, 2025
  • Fine-tune your storage-as-a-service approach
    • June 16, 2025
  • 8
    Advanced audio dialog and generation with Gemini 2.5
    • June 15, 2025
  • 9
    A Father’s Day Gift for Every Pop and Papa
    • June 13, 2025
  • 10
    Global cloud spending might be booming, but AWS is trailing Microsoft and Google
    • June 13, 2025
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • Google Cloud, Cloudflare struck by widespread outages
    • June 12, 2025
  • What is PC as a service (PCaaS)?
    • June 12, 2025
  • 3
    Crayon targets mid-market gains with expanded Google Cloud partnership
    • June 10, 2025
  • By the numbers: Use AI to fill the IT skills gap
    • June 11, 2025
  • 5
    Apple services deliver powerful features and intelligent updates to users this autumn
    • June 11, 2025
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.