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

Coding With Your Hands Tied

Coding With Your Hands Tied

This session goes through the nuances on how Android libraries have to be developed in a restricted environment as they run inside other apps.

For example, while a majority of the apps use famous libraries like Retrofit or Volley to do their network calls, an SDK needs to either use AsyncTask or conjure up a trick using Threads and Handlers to ensure their networking is smooth. While apps use advanced DB libraries or frameworks like Room/Realm/greenDAO, Android libraries who cannot use these because it would mean that the apps into which they land up in would also have to add them as a dependency, have to make do with SQLite.

Once I mention the different types of problems faced by Libraries in terms of networking, database handling, UI components, handling images/GIFs/Video, efficient library size and also handling backward compatibility, I will provide my solutions which I have used in the CleverTap Android SDK as one of the possible solutions. I will also shed some light on the process of publishing libraries on JCenter or MavenCentral.

The aim of this session is to bring a wide range of app developers to the not so bright side of the development of Android Libraries and Frameworks and probably engage their minds into thinking the challenges faced by libraries and providing tried and tested solutions so that they can explore this niche world on their own.

Darshan Pania

October 12, 2019
Tweet

More Decks by Darshan Pania

Other Decks in Programming

Transcript

  1. Darshan Pania CleverTap @i_m_Pania Coding With Your Hands Tied -

    A session on Android Library Development
  2. Helping marketing, product and growth teams at B2C companies retain

    their users for life. We enable this at scale, in real-time and with precision by providing a unique combination of: 1. A unified user data platform 2. Actionable insights and segmentation 3. Timely, personalized omni-channel engagement What does do?
  3. Dependencies used by Apps • Networking ◦ Volley ◦ Retrofit

    • Image/GIFs ◦ Glide ◦ Picasso • Video ◦ ExoPlayer • Databases ◦ Room ◦ Realm ◦ greenDAO • Dependency Injection ◦ Dagger ◦ ButterKnife • UI Components ◦ Constraint Layout
  4. Dependencies used by Libraries • Networking ◦ None • Image/GIFs

    ◦ None • Video ◦ None • Databases ◦ None • Dependency Injection ◦ None • UI Components ◦ None
  5. Dependencies used by CleverTap SDK • Networking ◦ None •

    Image/GIFs ◦ Glide • Video ◦ ExoPlayer • Databases ◦ None • Dependency Injection ◦ None • UI Components ◦ None
  6. How to publish Libraries? • Setup Bintray account • Setup

    your build.gradle • Package and Publish
  7. Add your Bintray username and API key to local.properties In

    the build.gradle of your library module