I am making an audiobook player app to play all the audiobook files (mp3) of my favorite authors.
I am using SQLite to store the data; It runs well on the local device.
Now I would like to improve it, so I can publish it to the Play Store (but the app has 23gb of data). Where can I store the audio files, and the users can download the audio files later after the users install the app?
Welcome to the Android World !!
Short Answer:
Put data in a Cloud Database and fetch each audiobook when selected by user. Eg(Google Firestore or Amazon Cloud Storage)
Explained Answer:
Some application works as the utility in device to interact with user (Like Reminder Application, Photo Gallery App, PDF Reader App etc.). These apps do not require any large database as backend, so these apps can have their database in the mobile device itself as SQLite or Room Database.
On the other hand, there are application which works as the client to interact with very large database (Like YouTube App, Amazon Prime Videos App, Any Bank Application etc.) Then the concept of cloud database arises. To communicate with database, you need some mechanism that’s what called APIs.
Now you have two options either create your own database (A computer to work as a server and database) and APIs to communicate with your database or use existing solutions.
Google/Amazon and many other companies are providing cloud database solution and many companies are using it already such as Twitter, Netflix, Amazon Shopping, Facebook etc. With these solutions you can create a database on their end and they will provide you APIs to get data from your newly created database.
If you are starting in Mobile Development, then I will suggest you to first get more information about the APIs. You can start with an existing database which already have data stored and you can simply call APIs to get data from database in JSON format. A very good example of this kind of database for learning APIs call and dealing with database will be TMDB (The Movie Database). They have a large database on movies worldwide and you can interact and get data from their database for free in JSON format and create an application like IMDB or like this.
If you go through this learning curve, I am sure you will be able to answer this question by your own. Once you know how to interact with database in cloud, you can choose your desired solutions by different companies and will be able to store and get your audiobook in your application on user request without storing any data in your application.
Happy Coding !!