Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Data Persistence The capability to have data that the app uses or relies on to c

ID: 3863657 • Letter: D

Question

Data Persistence

The capability to have data that the app uses or relies on to continue to be available regardless of changes to the app’s state as it moves through the app life cycle is vital to the user experience with the app—and for the app itself to be a useful tool. For this to occur, the data needs to persist through these life cycle changes. Android provides several ways in which the developer can make data persist.

List

Lists are very useful tools and have become ubiquitous in mobile computing. Lists are an ordered collection (also known as a sequence). The user of this interface has precise control over where in the list each element is inserted. The user can access elements by their integer index (position in the list), and search for elements in the list. Lists are common because they are a very useful way to organize, display, and access large amounts of data on a very small screen.

Questions:

Introduce data persistence approaches with example

Explore the implementation of lists in Android

Respond to TWO other class member postings: observe, criticize or agree to their statements by giving logical and complete responses.

Explanation / Answer

1) Introduce data persistence approaches with example

The Android framework offers several options and strategies for data persistence:

Use Cases

Each storage option has typical associated use cases as follows:

2) Explore the implementation of lists in Android

Android provides the ListView and the ExpandableListView classes which are capable of displaying a scrollable list of items. The ExpandableListView class supports a grouping of items.

ListView is a view group that displays a list of scrollable items. The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array or database query and converts each item result into a view that's placed into the list.

The adapter would inflate the layout for each row in its getView() method and assign the data to the individual views in the row.

The adapter is assigned to the ListView via the setAdapter method on the ListView object.

3) Respond to TWO other class member postings: observe, criticize or agree to their statements by giving logical and complete responses.

Data Persistence:

Agree : Being able to save or persist data within our apps is an important fundamental skill. It enables our users to save their work, remember their preferences, store all types of files for reuse, and more. These features are evident to some degree in almost every application.

List:

Agree:

Logical Reason - Lists are