Kotlin and Android Development Featuring Jetpack: Build Better, Safer Android Apps

Fazio, Michael

  • 出版商: Pragmatic Bookshelf
  • 出版日期: 2021-07-20
  • 定價: $1,700
  • 售價: 8.0$1,360
  • 語言: 英文
  • 頁數: 446
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1680508156
  • ISBN-13: 9781680508154
  • 相關分類: AndroidJVM 語言
  • 立即出貨 (庫存 < 3)

商品描述

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.

商品描述(中文翻譯)

以Kotlin和Jetpack的廣泛工具、庫和最佳實踐的方式開始建立現代化的原生Android應用程序。學習如何使用Fragments創建高效、有彈性的視圖,並使用ViewModels在視圖之間共享數據。使用Room快速持久化有價值的數據,並使用Kotlin避免NullPointerException和Java冗長的表達式。您甚至可以使用Kotlin協程優雅地處理異步Web服務調用。通過按照詳細的逐步說明構建兩個功能完整的應用程序,實現所有這些功能以及更多。

有了Kotlin和Jetpack,Android開發比以往更加順暢和愉快。通過開發兩個完整的Android應用程序,立即開始。

在第一個應用程序"Penny Drop"中,您將創建一個完整的遊戲,包括隨機擲骰子、可自定義的規則和AI對手。使用數據綁定快速建立輕量級的Fragment視圖,使用ViewModel類快速且安全地更新數據,並在單一位置處理所有應用程序導航。使用Kotlin和Android特定的Kotlin擴展,以高效的方式編寫無空指針的代碼,而無需為Jetpack + Kotlin之前的應用程序編寫所有常規樣板代碼。使用Room庫將數據持久化並檢索為完整對象,然後使用ViewModels顯示該數據並在RecyclerView中列出記錄。

接下來,您將為Android棒球聯盟創建官方應用程序。這是一個虛構的聯盟,但是一個真實的應用程序,您將在"Penny Drop"中學到的知識上進一步構建。通過導航抽屜在整個應用程序中導航,包括通過Android應用程序鏈接訪問特定位置。使用Kotlin協程處理異步和Web服務調用,使用分頁庫平滑顯示數據,並從應用程序向用戶的手機發送通知。

使用Kotlin和Jetpack以現代化的方式構建Android應用程序。

您需要Android SDK、文本編輯器以及真實的Android設備或模擬器進行測試。雖然不是絕對必需的,但假設您使用的是Android Studio,它附帶了Android SDK並簡化了創建模擬器的過程。此外,一些示例需要JDK 1.8或更高版本,但在使用JDK 1.6時,所有這些部分也可以以其他方式完成。

作者簡介

Michael Fazio is a software developer and tech speaker who fell in love with Android starting with the original Galaxy S phone. He's been the Android lead for multiple billion-dollar companies and has seen the Android development process evolve from far too many Activities and a nigh unusable emulator to the actually enjoyable dev experience of Kotlin + Jetpack.

作者簡介(中文翻譯)

Michael Fazio 是一位軟體開發者和科技演講者,他從最初的 Galaxy S 手機開始就愛上了 Android。他曾擔任多家市值達十億美元的公司的 Android 主管,並見證了 Android 開發過程從過多的活動(Activities)和幾乎無法使用的模擬器,進化為 Kotlin + Jetpack 的令人愉悅的開發體驗。