![]() Your app should only interact with the SQLiteOpenHelper, which will be described below. When you use an SQLite database, represented as an SQLiteDatabase object, all interactions with the database are through an instance of the SQLiteOpenHelper class which executes your requests and manages your database for you. Content providers, which will be introduced in a later chapter, work excellently with SQLite databases.If you can represent your data as rows and columns, consider a SQLite database.You can use the database as the primary storage for user or app data, or you can use it to cache and make available data fetched from the cloud.An SQLite database is a good storage solution when you have structured data that you need to store persistently and access, search, and change frequently.Of the many storage options discussed, using a SQLite database is one of the most versatile, and straightforward to implement. Check out the SQL Primer chapter if you need a refresher. It is not an introduction to SQLite or SQL databases.The chapter assumes that you are familiar with SQL databases in general, and basic SQL query building. This chapter discusses the Android framework's SQLiteDatabase and SQLiteOpenHelper classes. This course is now deprecated and this content will be The new course is available atĪndroid Developer Fundamentals course (Version 2), or go directly to Lesson 13: Permissions, Performance and Securityġ3.1: Permissions, Performance and SecurityĪ new version of this course is now available, updated to reflectīest practices for more recent versions of the Android framework andĪndroid Studio. Lesson 11: Sharing data with content providersġ1.1: Share Data Through Content Providers Lesson 8: Triggering, scheduling and optimizing background tasks Lesson 3: Testing, debugging, and using support librariesĥ.3: Providing Resources for Adaptive Layouts 2.1: Understanding Activities and IntentsĢ.2: The Activity Lifecycle and Managing State
0 Comments
Leave a Reply. |