My Account Log in

3 options

Kotlin and Android development featuring Jetpack : build better, safer Android apps / Michael Fazio.

EBSCOhost Academic eBook Collection (North America) Available online

View online

Ebook Central College Complete Available online

View online

Ebook Central College Complete Available online

View online
Format:
Book
Author/Creator:
Fazio, Michael, author.
Language:
English
Subjects (All):
Application software--Development.
Application software.
Physical Description:
1 online resource (488 pages)
Edition:
First edition.
Place of Publication:
Raleigh, North Carolina : The Pragmatic Programmers, LLC, [2021]
Summary:
Start building native Android apps the modern way in Kotlin with Jetpack's expansive set of tools, libraries, and best practices. Learn how to create efficient, resilient views with Fragments and share data between the views with ViewModels. Use Room to persist valuable data quickly, and avoid NullPointerExceptions and Java's verbose expressions with Kotlin. You can even handle asynchronous web service calls elegantly with Kotlin coroutines. Achieve all of this and much more while building two full-featured apps, following detailed, step-by-step instructions.With Kotlin and Jetpack, Android development is now smoother and more enjoyable than ever before. Dive right in by developing two complete Android apps.With the first app, Penny Drop, you create a full game complete with random die rolls, customizable rules, and AI opponents. Build lightweight Fragment views with data binding, quickly and safely update data with ViewModel classes, and handle all app navigation in a single location. Use Kotlin with Android-specific Kotlin extensions to efficiently write null-safe code without all the normal boilerplate required for pre-Jetpack + Kotlin apps. Persist and retrieve data as full objects with the Room library, then display that data with ViewModels and list records in a RecyclerView.Next, you create the official app for the Android Baseball League. It's a fake league but a real app, where you use what you learn in Penny Drop and build up from there. Navigate all over the app via a Navigation Drawer, including specific locations via Android App Links. Handle asynchronous and web service calls with Kotlin Coroutines, display that data smoothly with the Paging library, and send notifications to a user's phone from your app.Come build Android apps the modern way with Kotlin and Jetpack!What You Need:You'll need the Android SDK, a text editor, and either a real Android device or emulator for testing. While not strictly required, it's assumed you're using Android Studio, which comes with the Android SDK and simplifies creating an emulator. Also, a few examples require JDK 1.8 or later, though all of these pieces can be completed in other ways when using JDK 1.6.
Contents:
Intro
Kotlin and Android Development fe aturing Jetpack
About the Pragmatic Bookshelf
Table of Contents
Early Praise for Kotlin and Android Development featuring Jetpack
Acknowledgments
Preface
Introduction
Who Is This Book For
If You're New to Android and/or Kotlin
How to Read This Book
Development Tips for the Book
Online Resources
Ready to Go?
Pa rt 1 Penny Drop
Chapter 1: Initialize the Penny Drop App
How to Play Penny Drop
Create the App
What Else Do We Need?
Summary and Next Steps
Chapter 2: Build Views with Fragments
Build a Fragment (Pick Players)
Add Data Binding to the App
Build Another Fragment (G ame)
Chapter 3: Bind Data with ViewModels
Create a ViewModel (Pick Players)
Bind ViewModel to a Fragment (Pick Players)
Add AI Spinner to Player List Items
Customize the Player List Items
Create Another ViewModel (Game)
Bind ViewModel to a Fragment (Game)
Chapter 4: Update LiveData with Conditional Game Logic
Create GameHandler
Start a Game
More GameViewMod el Functions: roll() and pass()
Update the UI
Create Turn Summary Text
Handle AI Turns with Coroutines and First-Cla ss Functions
Chapter 5: Persist Game Data with Room
Add Room to the App
Add a RoomDatabase Class
Create a DAO Class
Add Entity Classes
Add Data During Database Creatio n
Add Converters to the Database
Create a Repository Class
Access the Database from a V iewModel
Update the UI Data Binding
Chapter 6: Build a List with RecyclerView
Add the RecyclerView
Build the List Item Layout
Create a Custom ListAda pter
Connect Adapter to RecyclerView
Load Data into RecyclerVie w from Database
Summary and Next Steps.
Chapter 7: Customize an App with Settings and Themes
Add a New SettingsFragment
Use Saved Preferences
Add Themes
Change Themes
Add Night Mode Support
Add an About the App Section
Part 2: Android Baseball League
Chapter 8: Initialize the Android Baseball League App
Welcome to the Official ABL App
Configure the Activity
Add the First Fragment
Chapter 9: Navigate via Navigation Drawer
Add the Navigation Drawer
Add Fragments (Standing s and Single Team)
Pass Data with Safe Args
Navigate Directly via a Dee p Link
Chapter 10: Load and Save Data with Coroutines and Room
Create a Database
Work with Retrofit
Load Data from External APIs
Add a New Fragment (Scoreboard)
Chapter 11: Display Data with Paging
Add Two New Fragments (Leaders and Single Pla yer)
Add a New Fragment (Players)
Handle Paging Data in the App
Display Paging Data in a RecyclerView List
Chapter 12: Personalize the Android Baseball League App
Build a Settings Screen via Code
Extract Colors with Palette
Add and Group Additional Preferences
Reliably Complete Backg round Work with WorkManager
Chapter 13: Send Info to and from the Android Baseball League App
Alert Users with Notifications
Send Cloud-Based Alerts with Push Notificatio ns
Share Links with Android Sharesheet
Part 3: Test Your App
Chapter 14: Unit Test Your App with JUnit
Add Unit Tests
Test a ViewModel Class
Test a Data Access Object (DAO)
Chapter 15: Test Your App's UI with Espresso
Add UI Tests
Add More UI Tests
Part 4: Appendixes.
Appendix 1: Install Android Studio
Download Android Studio
Install Android Studio
Set Up an Android Virtual Device (AVD)
Appendix 2: Troubleshooting Your App
Debug Your App
Display Messages with the Toast Class
Log Messages to Logcat
Wrapping Up
Appendix 3: Gradle Dependencies
Classpath Dependencies
Implementation Dependencies
KAPT Dependencies
Test Dependencies
You May Be Interested In….
Notes:
Description based on publisher supplied metadata and other sources.
Description based on print version record.
ISBN:
9781680508680
1680508687
OCLC:
1262370464

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account