In the last three chapters we focused our efforts and energy on building a usable and, even more important, a marketable application. Nevertheless, users are still unable to really interact with our application. Indeed, they cannot create a profile, save preferences, or any other data. To address this shortfall, the Android platform allows the utilization of SQLite as an embedded, light, and powerful database. Moreover, in this chapter we will also take advantage of the LinQ mechanisms of the .Net framework to interact with this data.
In this chapter, we will pass through the following recipes:
As we stated in the preamble of this chapter, data is important to your users. However, unlike normal desktop applications where a database is—more or less—always the right answer for assessing data storage: phones are different, they have low storage capacities. Thus, the amount of space users will allow you to use on their phones is ridiculously low because they cannot afford to lose 1 GB for each application they install.
Consequently, as programmers, we have to adapt our applications to this special environment. If you aim to reduce the data footprint of your applications to the minimum, you must master the weapons the Android platform offers you.
The storage mechanisms in Android are oriented around three different methods.
Application_theme = blue,
drop the database thing and turn on the built-in mechanism we will see during the first recipe in this chapter.18.216.239.46