Dwimagita's blog

It's written to this way

Lesson 10: Storing data using SQLite (10.1B: Searching a SQLite Database)

Task 0. Download and run the base code

1. Create your project

1.1. Add an Options Menu with Search item

1.2. Create the layout for the search activity

1.3. Add an Activity for searching

1.4. Trigger SearchActivity from the menu

1.5. Implement the onClick handler for the Search button in the SearchActivity

1.6. Implement the search method in WordListOpenHelper


Lesson 10: Storing data using SQLite (10.1A: SQLite Database)

Task 0. Download and run the starter code

Task 1. Extend SQLiteOpenHelper to create and populate a database

1.1 Create a skeleton WordListOpenHelper class

1.2. Add database constants to WordListOpenHelper

1.3. Build the SQL query and code to create the database

1.4 Create the database in onCreate of the MainActivity

1.5 Add data to the database

Task 2. Create a data model for a single word

2.1. Create a data model for your word data

Task 3. Implement the query() method in WordListOpenHelper

3.1. Implement the query() method

3.2. The onUpgrade method

Task 4. Display data in the RecyclerView

4.1. Update WordListAdapter to display WordItems

Task 5. Add new words to the database

5.1. Write the insert() method

5.2. Get the word to insert from the user and update the database

5.3. Implement getItemCount()

Task 6. Delete words from the database

6.1. Write the delete() method

6.2. Add a click handler to DELETE button

Task 7. Update words in the database

7.1. Write the update() method

7.2. Add a click listener to the EDIT button

7.3. Add updating to onActivityResult

7.4. Design and error considerations


Lesson 9: Preferences and Settings (9.2: Adding Settings to an App)

Task 1: Add a switch setting to an app

1.1 Create the project and add the xml directory and resource file

1.2 Add the XML preference and attributes for the setting

1.3 Add an activity for settings and a fragment for a specific setting

1.4 Connect the Settings menu item to the settings activity

1.5 Save the default values in shared preferences

1.6 Read the changed settings value from shared preferences

Task 2: Using the Settings Activity template

2.1 Explore the Settings Activity template

2.2 Add the Settings menu item and connect it to the activity

2.3 Customize the settings provided by the template

2.4 Add code to set the default values for the settings

2.5 Add code to read values for the settings


Lesson 9: Preferences and Settings (9.1: Shared Preferences)

Task 1. Explore HelloSharedPrefs

1.1 Open and Run the HelloSharedPrefs Project

1.2 Explore the Activity code

Task 2. Save and restore data to a shared preferences file

2.1 Initialize the preferences

2.2 Save preferences in onPause()

2.3 Restore preferences in onCreate()

2.4 Reset preferences in the reset() click handler


Lesson 8: Triggering, scheduling and optimizing background tasks (8.3: Job Scheduler)

Task 1. Implement a JobService

1.1 Create the Project and the NotificationJobService

1.2 Implement onStartJob()

Task 2. Implement the job conditions

2.1 Implement the network constraint

2.2 Check for constraints

2.3 Implement the Device Idle and Device Charging constraints

2.4 Implement the Override Deadline constraint

2.5 Implement the Periodic constraint


Lesson 8: Triggering, scheduling and optimizing background tasks (8.2: Alarm Manager)

Task 1. Set up the Stand Up! project and views

1.1 Create the Stand Up! project layout

1.2 Set up the setOnCheckedChangeListener() method

Task 2. Set up the notification

2.1 Create the notification

Task 3. Create the repeating alarm

3.1 Set up the broadcast pending intent

3.2 Set the repeating alarm

3.3 Create the Broadcast Receiver

3.5 Check the state of the alarm


Lesson 8: Triggering, scheduling and optimizing background tasks (8.1: Notifications)

Task 1. Create a basic notification

1.1 Create the project

1.2 Build your first notification

1.3 Add a content intent

1.4 Add priority and defaults to your notification

Task 2. Update and cancel your notification

2.2 Implement the cancel and update notification methods

2.3 Toggle the button state

Task 3. Add notification actions

3.1 Implement the “Learn More” action

3.2 Implement the “Update” action


Lesson 7: Background Tasks (7.3: Broadcast Receivers)

Task 1. Set up the PowerReceiver Project

1.1 Create the Project

1.2 Register your Receiver for system broadcasts

1.3 Implement onReceive() in your BroadcastReceiver

1.4 Restrict your Broadcast Receiver

Task 2. Send and Receive a Custom Broadcast

2.1 Define your custom Broadcast Action string

2.2 Add a “Send Custom Broadcast” Button

2.3 Implement sendCustomBroadcast()

2.4 Register your Custom Broadcast

2.5 Respond to the Custom Broadcast


Lesson 7: Background Tasks (7.2: Connect to the Internet with AsyncTask and AsyncTaskLoader)

Task 1. Explore the Books API

1.1 Send a Books API Request

1.2 Analyze the Books API Response

Task 2. Create the “Who Wrote It?” App

2.1 Create the project and user interface

2.2 Set up the Main Activity

2.3 Create an empty AsyncTask

2.4 Create the NetworkUtils class and build the URI

2.5 Make the Request

2.6 Add the Internet permissions

2.7 Parse the JSON string

Task 3. Implement UI Best Practices

3.1 Hide the Keyboard and Update the TextView

3.2 Manage the network state and the empty search field case

Task 4. Migrate to AsyncTaskLoader

4.1 Create an AsyncTaskLoader

4.2 Modify MainActivity


Lesson 7: Background Tasks (7.1: Create an AsyncTask)

Task 1. Set up the SimpleAsyncTask project

1.1 Create the layout

Task 2. Create the AsyncTask subclass

2.1 Subclass the AsyncTask

2.2 Implement doInBackground()

2.3 Implement onPostExecute()

Task 3. Implement the final steps

3.1 Implement the method that starts the AsyncTask

3.2 Implement onSaveInstanceState()


« Older posts

© 2018 Dwimagita's blog

Theme by Anders NorenUp ↑