Although mobile apps do not rely on databases as much as, say, web applications, mobile app developers should still be interested in databases. There are better database solutions for Android apps than a native SQLite library; we’ll nominate ORMs (Object Relational Mapping) as one of them.ORMs make developers’ lives easier. They let us avoid struggling with building queries by concatenating strings or manually handling the connection with database. Typos are less of threat to your queries. And, with ORMs taking care of security, you don’t have to worry about resistance to injection attacks. You can focus on your application functionalities and let the database do its job.
When developing an application with a SQLite database as persistent storage, it’s worth it (or necessary, in fact) to know some low-level details like: where the data is storedphysicallyand how we can determine if its structure is really the same as what we expect it to be. Being familiar with these things makes it easier and faster to develop, as well as find and fix bugs. I’ll try to explain some of the most frequently asked questions regarding SQLite databases.
In the previous article we wrote a simple Android app allowing the user to manage his ToDo list. He could add new tasks, mark them as done and delete them. That article showed how to create an SQLite DB in an automated way and how to do some simple CRUD operations on it.Let’s say that the first version of an application is released, we distribute it (i.e., it shows up in Google Play), people download and use it. After some time we decide to improve the app. Our goal is to add the ability to prioritize the tasks.
According to the report of the International Data Corporation , Android operating system reached more than 80% market share during the 3rd quarter of 2013. Together with iOS, Android dominates in the mobile devices’ world.This made me think that it may be worth writing a few words about how to create mobile applications for these two mobile platforms. But not the kind of “hello world” applications – there are plenty of tutorials about that. I’d like to focus on the use of local