proxykda.blogg.se

Android sqlite tutorial
Android sqlite tutorial









So SQLite is easy – right? – yes, Android SQLite is easy to use! However “easy” maybe relative, what is relatively easy to you maybe challenging for me. These are called mobile backend as a service or MBASS.

  • MBASS – if you do not want to become a system admin in other to implement network storage in your Android app then you may want to save time and effort by using one of the available commercial services that provides network storage and some other utilities to mobile apps.
  • If the network that you want to access from your Android app is yours then that data has to be formatted into or presented by a web service.
  • REST – it is likely that you will be accessing your networked data store from Android using the internet. REpresentational State Transfer (REST) is a common standard that you can follow to access network resources from your Android app over HTTP which is the data transfer protocol of the internet.
  • android sqlite tutorial

    There are a few terminology associated with network data access in Android.

    android sqlite tutorial

  • Network – in some cases you may have data that is not efficient to store in the local device and in such case storing the data on the network is an option.
  • Device Storage – if you want to save the pictures of your recent trip to your device? it maybe hard to reduce these to the units that Shared Preference can handle, in this case you can simple dump those large data on the device storage.
  • If you place an order from an online store, your order number is a primitive because it is a Long, or Double, you cannot directly save your Order because it is not a native Java data type. Primitive data types are data that has been decomposed into units that are native to the programming language (Java in this case).

    android sqlite tutorial

    Shared Preference – this tools is used to save primitive data in Android.SQLite is not the only way to save data in Android, there are other options and each has its own use case. For you as a developer the biggest benefit of using SQLite in Android is the small number of installation steps required to install SQLite in Android – the actual number of steps to install SQLite in Android is zero because it is already installed. The designers of Android chose SQLite to be the main data persistence component for Android because of its easy of use, cost, licensing among other reasons. SQLite predates Android, it is used in other major applications other than Android. And what is data persistence you may ask? data persistence is a fancy and more technically correct way of saying data storage. The data you persist are the data that you do not want to loose each time the users of your app close the app. So SQLite is some type of database, why do we need it in Android? well we use it for data persistence in Android.











    Android sqlite tutorial