Reputation: 277
I'm building a songbook Android application that displays songs' lyrics that I provide and some data like how many likes it's got (user is able to like a song), etc. Something like Spotify but only with lyrics. I need to store over 700 songs and I don't know what method to choose. It would be great if I could display the data on a website in the future too.
I've heard of JSON and XML but never used it. I am familiar with SQL databases like MySQL or SQLite, but I need to store almost pure text (including new lines) with some meta data and I think a database will not be efficient. I thoght of storing txt files in SQLite BLOB format. Also it would be great if the user would not have to update the app after adding one song to the database. BUT I also need it to work when user is offline.
To this day I've only build desktop apps with no networking and no API use. I am ready to learn this so if you have an idea what should I choose, could you provide any tips how to start?
Upvotes: 1
Views: 706
Reputation: 91
You could use SQLite to store those lyrics. According to SQLite documentation you can store string or blob with a length up to 2147483647. You could start by learning how to use room to implement the database in Android. To add new songs, you would probably need to implement an API client, and I recommend you learn about Retrofit. Your app would check an API to determine if there is a new song and insert it into the SQLite local database.
Upvotes: 2