Presentation is loading. Please wait.

Presentation is loading. Please wait.

1. 2 The Address Book app provides convenient access to contact information that’s stored in a SQLite database on the device. You can: scroll through.

Similar presentations


Presentation on theme: "1. 2 The Address Book app provides convenient access to contact information that’s stored in a SQLite database on the device. You can: scroll through."— Presentation transcript:

1 1

2 2

3

4 The Address Book app provides convenient access to contact information that’s stored in a SQLite database on the device. You can: scroll through an alphabetical contact list view a contact’s details by touching a contact’s name in the contact list add new contacts edit or delete existing contacts. New technologies:

5 Dynamically add Fragments to and remove Fragments from an Activity’s GUI using FragmentTransactions. Fragment back stack to enable back-button support, so the user can navigate backward through the Fragments that have been displayed. Display database data in a RecyclerView. Create and open a database with a subclass of SQLiteOpenHelper. New technologies:

6 Use a ContentProvider, a ContentResolver and a SQLiteDatabase object to perform database insert, update, delete and query operations. Use a LoaderManager and Loaders to perform database access asynchronously outside the GUI thread and to receive those results in the GUI thread. Define styles containing common GUI attributes and values, then apply them to multiple GUI components. New technologies:

7 Use only one Activity to host all of the app’s Fragments. Fragments for viewing, adding and editing contacts as they’re needed. Use the FragmentManager and FragmentTransactions to dynamically display Fragments. To communicate data between Fragments and a host Activity or the Activity’s other Fragments, through the host Activity this makes the Fragments more reusable, because they do not refer to one another directly.

8 New technologies: The contact information is stored in a SQLite database. SQLite is one of the world’s most widely deployed database engines. Use a subclass of SQLiteOpenHelper to simplify creating the database and to obtain a SQLiteDatabase object (package android.database.sqlite) for manipulating the database’s contents. Database queries are performed with Structured Query Language (SQL). Query results are managed via a Cursor (package android.database).

9 New technologies: A ContentProvider (package android.provider) exposes an app’s data for use in that app or in other apps. Android provides various built-in ContentProviders. For example, your apps can interact with data from the Android Contacts and Calendar apps.

10 New technologies: There are also ContentProviders for various telephony features, the media store (e.g., for images/video) and the user dictionary (used with Android’s predictive text-input capabilities). To invoke the ContentProvider’s query, insert, update and delete capabilities, use the corresponding methods of the Activity’s built- in ContentResolver (package android. content).

11


Download ppt "1. 2 The Address Book app provides convenient access to contact information that’s stored in a SQLite database on the device. You can: scroll through."

Similar presentations


Ads by Google