Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The making of an Android library: Download Man...

The making of an Android library: Download Manager v2

Android allows developers to add download functionality to their apps, but if you want to extend that behaviour, or customise it to your liking — that’s not easy. That’s why at Novoda we created an improved version of the Download Manager.

This is the perfect example to see how Android developers can share common code between more projects through an Android Library. In this deck I show how to get started creating a library, what are the difficulties we encountered and finally how to publish and share the library between multiple projects.

danybony

April 05, 2019
Tweet

More Decks by danybony

Other Decks in Programming

Transcript

  1. Novoda’s Download Manager • Fork from AOSP Download Manager •

    Downloads to internal storage • Multiple files grouped in batches • Client app rules for download start/resume
  2. Novoda’s Download Manager • Entirely rewritten • Easier batching •

    More control for client app: • download rules • notifications customisation • storage location • Replaced SQLite with Room • Better API for downloads status querying • Goodbye Content Provider v2
  3. Clear readme • Dependency definition • Sample usage • Most

    common use cases • Important information for first time users
  4. Contributions • Be present • Address comments, ask for details

    if needed • Be opinionated, but 
 evidence-based
  5. Conclusions • Libraries • Small scope • Prevent coupling •

    Reuse solutions • Create • Dedicated module • Fork existing one • Generalise / evolve • Demo app! • Open source • Clear readme • Templates • Continuous Integration • Release • Semantic versioning • Composite builds • Automated releases