Yalantis
Find out what makes Audible so successful and get some business and technological insights on how to build a similar audiobook app.

How to build an app for listening to audiobooks

  • Dima Sholom

    Android developer

  • Alyona Zakurdaieva

    Head of marketing

Share

In the era of digitization, an evening by the fireplace under a handmade quilt with your favorite book is a thing of dreams. But thanks to modern technologies, audiobook apps allow us to be wrapped up in the world of literature even in the middle of our busy schedules. We can have our virtual bookshelves right on our smartphones and listen to our favorite talking books on the way to work, at the gym, or while cleaning the kitchen.

Of course, you could just download an audiobook file (an MP3 file, for instance) and listen to it on your phone or audio player. But a basic MP3 player or music player app can’t provide book recommendations based on your preferences and can’t save bookmarks. This is why the majority of people who regularly listen to audiobooks prefer dedicated audiobook apps.

One of the most successful players in the audio industry of books – Amazon’s Audible – has more than 100 million downloads on the Google Play Store. According to the Audible blog, the service now reaches millions of subscribers around the world.

We decided to analyze the inner workings of audiobook applications like Audible to determine the challenges faced by developers when creating a similar app.

Why should you consider building an app for audiobooks?

At this point, audiobooks are the fastest-growing segment of the publishing industry. Many retailers have already realized that audiobook app development is worth investing in, and publishers consider audiobooks a great way to promote their catalogs.

According to a study by IBISWorld, the US audiobook publishing industry will generate $1.2 billion in revenue in 2020 and has grown approximately 15.8 percent annually between 2015 and 2020. The market size of the industry is predicted to increase by 5.8 percent in 2020 alone. According to the Pew Research Center, one in five Americans regularly listen to audiobooks.

How Amazon’s Audible contributed to audiobook market growth

The first reason why the audiobook industry is so hot is the emergence of Amazon’s Audible. The very existence of such a convenient application for listening to audiobooks is one of the reasons why the industry as a whole has seen a dramatic increase in consumer interest and, consequently, revenue.

Before Audible, listening to audiobooks meant buying CDs or downloading files to a computer and then copying them to an MP3 player or phone. Audible has enabled users to download audiobooks directly on their mobile devices, which are always at hand.

Also, another Amazon product has caused a boom in this industry – the Audiobook Creation Exchange (ACX). ACX is a marketplace for authors, narrators, publishers, and rights holders to create and exchange audiobooks. We’ll consider ACX in detail a bit later.

It’s not surprising that an industry that’s growing so rapidly would attract developers and investors who want to get their piece of the cake.

What business model might an audiobook app follow? 

There are two popular business models among online audiobook services.

Subscriptions based on monthly credits

After an initial 30-day free trial, Audible users may choose a subscription plan. In general, Audible subscriptions work using credits. One credit equals one audiobook.

The lowest priced Audible subscription is $7.95 per month. It doesn’t provide any credits but enables users to listen to select audiobooks, Audible originals, podcasts, and other audio content with no time limits. A $14.95 per month plan gives a user one monthly credit with the ability to upgrade to two credits per month and a 30 percent discount for any additional audiobooks. Users can purchase monthly or annual plans to get access to titles available on the service.

This pricing approach has been proven successful not only by Audible but also by other popular audiobook services including Kobo Audiobooks, Audiobooks.com, and Downpour. All of these services use a similar subscription model where users pay to access one audiobook per month.

Unlimited access subscription

But not all audiobook services use a subscription model based on monthly credits. For example, Playster offers two monthly plans with unlimited audiobook listening. The $14.95 per month plan enables users to access over 100,000 audiobooks. Access to premium audiobooks costs $29.95 per month.

Here’s the catch: often, users sign up for the lower-priced package to find out that they need to upgrade to be able to listen to all the audiobooks they want to. This makes Audible more cost-effective for users than Playster. But there’s another even more economical service for bookworms.

Scribd offers an unlimited subscription that provides access to as many titles as you want for $9.99 per month. Initially offering subscribers unlimited access to its library, Scribd then followed Audible’s steps by providing access to just one audiobook per month.

But in 2018, Scribd went back to its unlimited plan to please its audiobook fans. Only time will tell whether this subscription approach is viable in the long run. However, in 2019, company management said Scribd was profitable, bringing in $100 million in annual recurring revenue.

How does Audible deal with rights holders?

For audiobooks created through ACX and sold on Audible, rights holders receive 25 percent of all revenue if the audiobook is not exclusive to Audible; for titles exclusively available on Audible, rights holders receive a 40 percent cut.

There’s one key feature that makes Audible desirable to indie publishers: it allows users to share audiobooks via email, SMS, or WhatsApp. Users can also share audiobooks through the Family Library sharing feature.

Audible defrays all expenses for the distribution of shared titles. In other words, when a user downloads an audiobook and sends it to someone else, Audible pays rights owners for each subsequent listen. This move allows independent publishers to attract wider audiences at a lower cost.

The Audible, Amazon, and other audiobook services have a set of requirements for audiobooks they distribute. For example, you may need to split your book’s audio files into chapters instead of submitting your book as one whole file, include a retail audio sample that’s one to five minutes long, and so on.

If you’re ready to get your piece of the audiobook industry pie by creating your very own app, then allow us to suggest some ways to fill it with content.

Read also: How to Make Your App Available Offline

Where can you find content for your app?

Of course, you can fill your app with audiobooks created by your own company if you have enough resources for that. But it takes a lot of money, time, and effort to create content this way. Instead, there are more realistic ways to fill your app with ebook content.

Marketplaces for audiobook creators. We’ve already mentioned ACX – a marketplace for anyone involved in the ebooks creation process such as authors, publishers, narrators, and rights holders. Rights holders for a book can post a job for creating an audiobook on ACX, and studios and solo narrators can search for titles they’re interested in bringing to life. Once audiobooks have been produced, publishers can distribute them directly from ACX to Audible and even their own websites and apps.

APIs. Some companies don’t sell content directly to users. Instead, they provide APIs that allow retailers to access their titles and sell them on to consumers. The brightest example of this API business model is Findaway. Their API is used by companies including Scribd, Playster, and Downpour.

Related content. You can develop an audiobook app that, in addition to delivering audiobooks themselves, delivers news, articles, audio stories, and podcasts. In the first quarter of 2016, Audible expanded its range of content to include podcasts and news. Content for these categories is provided by authoritative sources including The Wall Street Journal, The New York Times, and the Washington Post.

How to build audio streaming functionality 

In this part of the article, we’ll share tips by our Android developer who has experience building audio streaming functionality.

Playback core

The first thing we need to do to provide an Android app with audiobook playback functionality is to choose a media playback engine. Nowadays, it’s common to use the ExoPlayer library provided by Google. ExoPlayer is an open source project that isn’t part of the Android platform framework and is distributed separately from the Android SDK.

By using this library, we can benefit from Dynamic Adaptive Streaming over HTTP (DASH), Smooth Streaming, and Common Encryption, which are not supported by MediaPlayer. ExoPlayer can be easily tied with NotificationManager to show a media playback notification as popular audio book players do.

ExoPlayer overview

There are two main components of the ExoPlayer library that can be used for playing audiobooks: SimpleExoPlayer and MediaSource. SimpleExoPlayer handles the interaction between events like play or pause, skip next, etc. MediaSource determines and provides media to be played by the ExoPlayer. 

There are multiple types of data sources, including
ProgressiveMediaSource, MaskingMediaSource, and LoopingMediaSource. In our example, we use ConcatenatingMediaSource to represent the playback queue, since we have multiple chapters for a single book. 

Read also: Writing a Request for Proposal to Your Potential Software Partner

Implementation

To make everything clear, we need to encapsulate ExoPlayer logic into the PlayerManager class where all interactions with the player happen. This class needs to be a singleton to ensure that the same instance will be injected in multiple places. Since we use Koin for the dependency injection, the class should look something like this:

single {
PlayerManager(
// dependencies
)
}

Inside the PlayerManager class, we have a SimpleExoPlayer instance:

class PlayerManager() 
{
val player: SimpleExoPlayer
}

For the player, we can also set the AudioAttributes that describe what we’re listening to. As we’re listening to audiobooks, we’ll set the type of content to speech, as recommended by Google. As a result, when we have an incoming message or a call, the system interrupts media playback so the user doesn’t miss any content.When we have content to play, we need to call just one function to make everything work:

private fun streamUrls(urls: List<String>, state: PlayerState, authToken: String) {
   val userAgent = Util.getUserAgent(context, context.getString(R.string.app_name))
   val source = ConcatenatingMediaSource()
   urls.forEach { url ->
      val mediaSource = ProgressiveMediaSource
       .Factory(DefaultHttpDataSourceFactory(userAgent).apply {
           defaultRequestProperties.set(RetrofitApiProvider.AUTH_HEADER_ACCESS_KEY, authManager.accessToken)
       }, DefaultExtractorsFactory())
       .createMediaSource(Uri.parse(url))
source.addMediaSource(mediaSource)
   }
   player.prepare(source)
   player.seekTo(state.chapterPosition, state.elapsedTimeMs)
}

Here, we determine the media source to play and tell the player what place to seek by passing a PlayerState object that has data about what chapter was last played and how many milliseconds have passed. 

For the sake of security, a user has to be authorized to play any content, so we added an authentication header to the HTTP request by using defaultRequestProperties. That’s pretty much it in terms of media playback.

Another interesting challenge we experienced was organizing data flows that come along with the book chapters list. This data includes the book’s cover image, the name of the chapter currently playing, and the current elapsed playback time. Almost every Android player app needs to have a playback notification, an in-app player widget to simplify navigation, and the player screen itself. All these parts need to have access to a single source of truth, and they need to be organized in a reactive way since we have constantly changing elapsed time and chapters.

To achieve that consistency, we can use the power of the RxJava/RxKotlin PublishSubject class and Kotlin data classes. PublishSubject can emit items to the current subscribers, and data classes provide us a copy function to construct new objects of state representation without needing to store old data.

The described above will look something like this:

class PlayerDataBus {
   private val playerDataSubject = BehaviorSubject.create<PlayerInfo>()
   var value: PlayerInfo = PlayerInfo()
       private set
   fun processPosition(position: Int) {
       val chapters = value.chapters.map { it.chapter }
val chapter = chapters[position]
val chapterId = chapter.id
val title = chapter.title
       playerDataSubject.onNext(value.copy(
               chapterNumber = position,
               chapterTitle = title,
               chapterId = chapterId
       ))
   }
}

Other parts of the app can easily observe player data in the following way:

private fun observePlayerData() {
   playerDataBus.observeInfo()
           .applySchedulers()
           .subscribeBy(
                   onError = {
                      // show your error here
                   },
                   onNext = { info ->
                       // process player info here
                   }
           ).addTo(compositeDisposable)
}

Now we have a media player engine properly set up to handle audiobook playback and reactive data flows that describe the currently playing chapter and the book and that can be used widely across the app.

Since the audiobook sector is hot and developing rapidly, we’re sure we’ll see many more changes and improvements soon. Just a few years ago, the e-book industry was booming, and now audiobooks are going through a period of rapid growth as well offering readers great functionality like reading list progress. It’s a great time to get on board with these trends. If you’re looking for a web and mobile app development company, drop us a line. We can help you turn your idea into a custom seamlessly working high-quality app.

In search of a software solution partner?

Get to know us better

See our services

Rate this article

Share this article

4/5.0

based on 206 reviews