Skip to content

A fully functional Android app built entirely with Kotlin and Jetpack Compose

Rename episode to NewsResource, add episode to NewsResource, add mockk and unit test, address comments

Adetunji Dahunsi12cff2074c1c
diff --git a/app/build.gradle b/app/build.gradle
index 5e7523c44..ba83d561b 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -60,6 +60,11 @@ android {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
+ testOptions {
+ unitTests {
+ includeAndroidResources = true
+ }
+ }
}
dependencies {
@@ -88,6 +93,10 @@ dependencies {
debugImplementation libs.androidx.compose.ui.testManifest
+ testImplementation libs.junit4
+ testImplementation libs.mockk
+ testImplementation libs.androidx.test.core
+
androidTestImplementation libs.junit4
androidTestImplementation libs.androidx.test.core
androidTestImplementation libs.androidx.test.espresso.core
diff --git a/app/src/main/java/com/google/samples/apps/nowinandroid/data/news/NewsResource.kt b/app/src/main/java/com/google/samples/apps/nowinandroid/data/news/NewsResource.kt
new file mode 100644
index 000000000..4a916eecf
--- /dev/null
+++ b/app/src/main/java/com/google/samples/apps/nowinandroid/data/news/NewsResource.kt
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.samples.apps.nowinandroid.data.news
+
+import java.util.Date
+
+/**
+ * Item representing a summary of a noteworthy item from a Now In Android episode
+ */
+data class NewsResource(
+ val episode: Int,
+ val title: String,
+ val content: String,
+ val url: String,
+ val authorName: String,
+ // TODO: Replace this with a type from kotlinx-datetime or similar in row al0AcTYbwbU6lyRWL5dOQ1
+ val publishDate: Date,
+ val type: String,
+ val topics: List<String>,
+ val alternateVideo: VideoInfo?
+)
+
+/**
+ * Data class summarizing video metadata
+ */
+data class VideoInfo(
+ val url: String,
+ val startTimestamp: String,
+ val endTimestamp: String,
+)
diff --git a/app/src/main/java/com/google/samples/apps/nowinandroid/data/news/NewsResourceRepository.kt b/app/src/main/java/com/google/samples/apps/nowinandroid/data/news/NewsResourceRepository.kt
new file mode 100644
index 000000000..d6b1cdd22
--- /dev/null
+++ b/app/src/main/java/com/google/samples/apps/nowinandroid/data/news/NewsResourceRepository.kt
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.samples.apps.nowinandroid.data.news
+
+import kotlinx.coroutines.flow.Flow
+
+/**
+ * Data layer implementation for [NewsResource]
+ */
+interface NewsResourceRepository {
+ /**
+ * Fetches available news resources
+ */
+ fun monitor(): Flow<List<NewsResource>>
+}
diff --git a/app/src/main/java/com/google/samples/apps/nowinandroid/data/news/fake/FakeNewsResourceRepository.kt b/app/src/main/java/com/google/samples/apps/nowinandroid/data/news/fake/FakeNewsResourceRepository.kt
new file mode 100644
index 000000000..d7d82eac1
--- /dev/null
+++ b/app/src/main/java/com/google/samples/apps/nowinandroid/data/news/fake/FakeNewsResourceRepository.kt
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.samples.apps.nowinandroid.data.news.fake
+
+import android.content.Context
+import com.google.samples.apps.nowinandroid.R
+import com.google.samples.apps.nowinandroid.data.news.NewsResource
+import com.google.samples.apps.nowinandroid.data.news.NewsResourceRepository
+import kotlinx.coroutines.flow.Flow
+
+/**
+ * [NewsResourceRepository] implementation that provides static news resources to aid development
+ */
+class FakeNewsResourceRepository(
+ private val context: Context
+) : NewsResourceRepository {
+ override fun monitor(): Flow<List<NewsResource>> {
+ context.resources.openRawResource(R.raw.data)
+ TODO("Deserialize json and return news resources")
+ }
+}
diff --git a/app/src/main/res/raw/data.json b/app/src/main/res/raw/data.json
new file mode 100644
index 000000000..323529b21
--- /dev/null
+++ b/app/src/main/res/raw/data.json
@@ -0,0 +1,1345 @@
+{
+ "resources": [
+ {
+ "episode": 52,
+ "title": "We hit 1M YouTube subscribers",
+ "content": "Thank you everyone for following the Now in Android series and everything the Android Developers YouTube channel has to offer. During the Android Developer Summit, our YouTube channel reached 1 million subscribers! Hereโ€™s a small video to thank you all.",
+ "URL": "https://youtu.be/-fJ6poHQrjM",
+ "authorName": "",
+ "publishDate": "2021-11-09T00:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ ""
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "MAD Skills: Transformations and customisations in the Paging Library",
+ "content": "In this third episode of the Paging MAD Skills series, TJ shows different operations that can be performed with Paging. Transformations like inserting separators, when to create a new pager, and customisation options for consuming PagingData.",
+ "URL": "https://youtu.be/ZARz0pjm5YM",
+ "authorName": "TJ",
+ "publishDate": "2021-11-01T00:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "MAD Skills",
+ "Paging"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "MAD Skills: Community tip on Paging",
+ "content": "In this fourth episode of the Paging MAD Skills series, Erik Zuo from the Android community shares a Paging tip.",
+ "URL": "https://youtu.be/r5JgIyS3t3s",
+ "authorName": "",
+ "publishDate": "2021-11-08T00:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "MAD Skills",
+ "Paging"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "MAD Skills: Paging Q&A",
+ "content": "In this live session, TJ and Dustin answered your questions in the usual live Q&A format.",
+ "URL": "https://youtu.be/8i6vrlbIVCc",
+ "authorName": "",
+ "publishDate": "2021-11-11T00:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "MAD Skills",
+ "Paging"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "MAD Skills: Gradle series kicks off",
+ "content": "Murat introduces the Gradle series and everything you'll learn in it.",
+ "URL": "https://youtu.be/mk0XBWenod8",
+ "authorName": "Murat",
+ "publishDate": "2021-11-15T00:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "MAD Skills",
+ "Gradle"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "MAD Skills: Intro to Gradle and AGP",
+ "content": "In the first episode of the Gradle MAD Skills series, Murat explains how the Android build system works, and how to configure your build.",
+ "URL": "https://youtu.be/GjPS4xDMmQY",
+ "authorName": "Murat",
+ "publishDate": "2021-11-15T00:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "MAD Skills",
+ "Gradle"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "MAD Skills: How to write a Gradle plugin",
+ "content": "In this second episode of the Gradle MAD Skills series, Murat explains how to write your own custom Gradle plugin.",
+ "URL": "https://youtu.be/LPzBVtwGxlo",
+ "authorName": "Murat",
+ "publishDate": "2021-11-22T00:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "MAD Skills",
+ "Gradle"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "MAD Skills: Take your Gradle plugin to the next step",
+ "content": "This third and last episode of the Gradle MAD Skills series teaches you how to get access to various build artifacts using the new Artifact API.",
+ "URL": "https://youtu.be/SB4QlngQQW0",
+ "authorName": "Murat",
+ "publishDate": "2021-11-29T00:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "MAD Skills",
+ "Gradle"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "AndroidX: AppCompat, Activity, and Fragment to support multiple back stacks",
+ "content": "The 1.4.0 release of these libraries brings stable support for multiple back stacks.",
+ "URL": "https://developer.android.com/jetpack/androidx/releases/appcompat#1.4.0",
+ "authorName": "",
+ "publishDate": "2021-11-17T00:00:00.000Z",
+ "type": "API change",
+ "topics": [
+ "AndroidX",
+ "Navigation"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "AndroidX: Emoji2 adds support for modern emojis",
+ "content": "The 1.0 stable release of Emoji2 allows you to use modern emojis in your app.",
+ "URL": "https://developer.android.com/jetpack/androidx/releases/emoji2#1.0.0",
+ "authorName": "",
+ "publishDate": "2021-11-17T00:00:00.000Z",
+ "type": "API change",
+ "topics": [
+ "AndroidX",
+ "Text"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "AndroidX: Lifecycle introduces lifecycle-aware coroutine APIs",
+ "content": "The new 2.4 release of Lifecycle introduces repeatOnLifecycle and flowWithLifecycle.",
+ "URL": "https://developer.android.com/jetpack/androidx/releases/lifecycle#2.4.0",
+ "authorName": "",
+ "publishDate": "2021-11-17T00:00:00.000Z",
+ "type": "API change",
+ "topics": [
+ "AndroidX",
+ "Lifecycle"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "AndroidX: Paging release brings changes to LoadState",
+ "content": "The new 3.1 release of Paging changes the behavior of LoadState.",
+ "URL": "https://developer.android.com/jetpack/androidx/releases/paging#3.1.0",
+ "authorName": "",
+ "publishDate": "2021-11-17T00:00:00.000Z",
+ "type": "API change",
+ "topics": [
+ "AndroidX",
+ "Paging"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "AndroidX: Wear tiles released as 1.0 stable",
+ "content": "The library that you use to build custom tiles for Wear OS devices is now stable.",
+ "URL": "https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.0.0",
+ "authorName": "",
+ "publishDate": "2021-11-17T00:00:00.000Z",
+ "type": "API change",
+ "topics": [
+ "AndroidX",
+ "Wear"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "Introducing Jetpack Media3",
+ "content": "The first alpha version of this new library is now available. Media3 is a collection of support libraries for media playback, including ExoPlayer. The following article explains why the team created Media3, what it contains, and how it can simplify your app architecture.",
+ "URL": "https://developer.android.com/jetpack/androidx/releases/media3",
+ "authorName": "Don Turner",
+ "publishDate": "2021-10-26T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "AndroidX",
+ "Media"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "The problem with emojis and how emoji2 can help out",
+ "content": "Meghan wrote about the new emoji2 library that just became stable.",
+ "URL": "https://medium.com/androiddevelopers/support-modern-emoji-99f6dea8e57f",
+ "authorName": "Meghan",
+ "publishDate": "2021-11-12T00:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "AndroidX",
+ "Text"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "Convert YUV to RGB for CameraX Image Analysis",
+ "content": "Learn about a new feature in CameraX to convert YUV, the format that CameraX produces, to RGB used for image analysis capabilities available in TensorFlow Lite, for example. Read the blog post for more information about these formats and how to use the new conversion feature.",
+ "URL": "https://medium.com/androiddevelopers/convert-yuv-to-rgb-for-camerax-imageanalysis-6c627f3a0292",
+ "authorName": "Kailiang Chen",
+ "publishDate": "2021-11-19T00:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "AndroidX",
+ "Camera"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "Improving App Startup: Lessons from the Facebook App",
+ "content": "Improving app startup time is not a trivial task and requires a deep understanding of things that affect it. This year, the Android team and the Facebook app team have been working together on metrics and sharing approaches to improve app startup. Read more about the findings in this blog post.",
+ "URL": "https://android-developers.googleblog.com/2021/11/improving-app-startup-facebook-app.html",
+ "authorName": "",
+ "publishDate": "2021-11-16T00:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Performance"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "About Custom Accessibility Actions",
+ "content": "The accessibility series continues on with more information on how to create custom accessibility actions to make your apps more accessible. You can provide a custom action to the accessibility services and implement logic related to the action. For more information, check out the following episode!",
+ "URL": "https://youtu.be/wWDYIGk0Kdo",
+ "authorName": "Shailen Tuli",
+ "publishDate": "2021-11-17T00:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "Accessibility"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "Conveying state for Accessibility",
+ "content": "In this episode of the Accessibility series, you can learn more about the StateDescription API, when to use stateDescription and contentDescription, and how to represent error states to the end user.",
+ "URL": "https://youtu.be/JvWM2PjLJls",
+ "authorName": "Shailen Tuli",
+ "publishDate": "2021-11-30T00:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "Accessibility"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "New Compose for Wear OS codelab",
+ "content": "In this codelab, you can learn how Wear OS can work with Compose, what Wear OS specific composables are available, and more!",
+ "URL": "https://developer.android.com/codelabs/compose-for-wear-os",
+ "authorName": "Jeremy Walker",
+ "publishDate": "2021-10-27T23:00:00.000Z",
+ "type": "Codelab",
+ "topics": [
+ "Compose",
+ "Wear OS"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 52,
+ "title": "ADB Podcast episode 179 Hosts 3, Guests 0",
+ "content": "Chet, Romain and Tor sit down to chat about the Android Developer Summit, and in particular all the new features arriving in Android Studio, along with a few other topics like Chetโ€™s new jank stats library, the Android 12L release, and more.",
+ "URL": "https://adbackstage.libsyn.com/episode-178-hosts-3-guests-0",
+ "authorName": "Chet Haase",
+ "publishDate": "2021-11-15T00:00:00.000Z",
+ "type": "Podcast ๐ŸŽ™",
+ "topics": [
+ "Android Studio",
+ "ADS",
+ "Performance",
+ "Android 12"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Android Basics in Kotlin course ๐Ÿง‘โ€๐Ÿ’ป",
+ "content": "Android Basics in Kotlin teaches people with no programming experience how to build simple Android apps. Since the first learning units were released in 2020, over 100,000 beginners have completed it! Today, weโ€™re excited to share that the final unit has been released, and the full Android Basics in Kotlin course is now available.",
+ "URL": "https://android-developers.googleblog.com/2021/10/announcing-android-basics-in-kotlin.html",
+ "authorName": "Murat Yener",
+ "publishDate": "2021-10-20T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Kotlin",
+ "Courses"
+ ],
+ "alternateVideo": {
+ "URL": "https://storage.googleapis.com/now-in-android/NIA049.mp4",
+ "startTimestamp": 82,
+ "endTimestamp": 97
+ }
+ },
+ {
+ "episode": 49,
+ "title": "WorkManager 2.7 adds setExpedited API to help with Foreground Service restrictions",
+ "content": "As the most outstanding release this time, WorkManager 2.7 was promoted to stable. This new version introduces a new setExpedited API to help with Foreground Service restrictions in Android 12.",
+ "URL": "https://developer.android.com/reference/android/app/job/JobInfo.Builder#setExpedited(boolean)",
+ "authorName": "",
+ "publishDate": "2021-10-20T23:00:00.000Z",
+ "type": "API change",
+ "topics": [
+ "WorkManager"
+ ],
+ "alternateVideo": {
+ "URL": "https://storage.googleapis.com/now-in-android/NIA049.mp4",
+ "startTimestamp": 97,
+ "endTimestamp": 121
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Updated Widget docs",
+ "content": "Widgets can make a huge impact on your userโ€™s home screen! We updated the App Widgets documentation with the recent changes in the latest OS versions. New pages about how to create a simple widget, an advanced widget, and how to provide flexible widget layouts.",
+ "URL": "https://developer.android.com/guide/topics/appwidgets",
+ "authorName": "",
+ "publishDate": "2021-10-20T23:00:00.000Z",
+ "type": "Docs ๐Ÿ“‘",
+ "topics": [
+ "Widgets"
+ ],
+ "alternateVideo": {
+ "URL": "https://storage.googleapis.com/now-in-android/NIA049.mp4",
+ "startTimestamp": 193,
+ "endTimestamp": 206
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Extend AGP by creating your own plugins",
+ "content": "The Android Gradle Plugin (AGP) contains extension points for plugins to control build inputs and extend its functionality. Starting in version 7.0, AGP has a set of official, stable APIs that you can rely on. We also have a new documentation page that walks you through this and explains how to create your own plugins.",
+ "URL": "https://developer.android.com/studio/build/extend-agp",
+ "authorName": "",
+ "publishDate": "2021-10-20T23:00:00.000Z",
+ "type": "Docs ๐Ÿ“‘",
+ "topics": [
+ "Gradle",
+ "Android Studio"
+ ],
+ "alternateVideo": {
+ "URL": "https://storage.googleapis.com/now-in-android/NIA049.mp4",
+ "startTimestamp": 206,
+ "endTimestamp": 220
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Revamped Compose Basics Codelab",
+ "content": "If youโ€™re planning to start learning Jetpack Compose, our modern toolkit for building native Android UI, itโ€™s your lucky day! We just revamped the Basics Jetpack Compose codelab to help you learn the core concepts of Compose, and only with this, youโ€™ll see how much it improves building Android UIs.",
+ "URL": "https://developer.android.com/codelabs/jetpack-compose-basics",
+ "authorName": "",
+ "publishDate": "2021-10-20T23:00:00.000Z",
+ "type": "Codelab",
+ "topics": [
+ "Compose"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Start an activity for a result from a Composable",
+ "content": "We expanded the Compose and other libraries page to cover how to start an activity for result, request runtime permissions, and handle the system back button directly from your composables.",
+ "URL": "https://developer.android.com/jetpack/compose/libraries",
+ "authorName": "",
+ "publishDate": "2021-10-20T23:00:00.000Z",
+ "type": "Docs ๐Ÿ“‘",
+ "topics": [
+ "Compose"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Material components in Compose",
+ "content": "We added a new Material Components and layouts page that goes over the different Material components in Compose such as backdrop, app bars, modal drawers, etc.!",
+ "URL": "https://developer.android.com/jetpack/compose/layouts/material",
+ "authorName": "",
+ "publishDate": "2021-10-20T23:00:00.000Z",
+ "type": "Docs ๐Ÿ“‘",
+ "topics": [
+ "Compose",
+ "Material design"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 49,
+ "title": "How to implement a custom design system",
+ "content": "How to implement a custom design system in Compose",
+ "URL": "https://developer.android.com/jetpack/compose/themes/custom",
+ "authorName": "",
+ "publishDate": "2021-10-20T23:00:00.000Z",
+ "type": "Docs ๐Ÿ“‘",
+ "topics": [
+ "Compose",
+ "Material design"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 49,
+ "title": "The anatomy of a theme",
+ "content": "Understanding the anatomy of a Compose theme",
+ "URL": "https://developer.android.com/jetpack/compose/themes/anatomy",
+ "authorName": "",
+ "publishDate": "2021-10-20T23:00:00.000Z",
+ "type": "Docs ๐Ÿ“‘",
+ "topics": [
+ "Compose",
+ "Themes"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Paging ๐Ÿ“‘ Displaying data and its loading state",
+ "content": "In the third episode of the Paging video series, TJ adds a local cache to pull from and refresh only when necessary, making use of Room . The local cache acts as the single source of truth for paging data.",
+ "URL": "https://www.youtube.com/watch?v=OHH_FPbrjtA",
+ "authorName": "TJ Dahunsi",
+ "publishDate": "2021-10-17T23:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "Paging",
+ "Room",
+ "Data storage"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Data safety in the Play Console ๐Ÿ”’",
+ "content": "Google Play is rolling out the Data safety form in the Google Play Console. With the new Data safety section, developers will now have a transparent way to show users if and how they collect, share, and protect user data, before users install an app.\nRead the blog post to learn more about how to submit your app information in Play Console, how to get prepared, and what your users will see in your appโ€™s store listing starting February.",
+ "URL": "https://android-developers.googleblog.com/2021/10/launching-data-safety-in-play-console.html",
+ "authorName": "Krish Vitaldevara",
+ "publishDate": "2021-10-17T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Play",
+ "Privacy & Security"
+ ],
+ "alternateVideo": {
+ "URL": "https://storage.googleapis.com/now-in-android/NIA049.mp4",
+ "startTimestamp": 49,
+ "endTimestamp": 82
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Honor every photo - How cameras capture images",
+ "content": "Episode 177: Honor every photon. In this episode, Chet, Roman, and Tor have a chat with Bart Wronski from the Google Research team, discussing the camera pipeline that powers the Pixel phones. How cameras capture images, how the algorithms responsible for Pixelโ€™s beautiful images, HDR+ or Night Sight mode works, and more!",
+ "URL": "https://adbackstage.libsyn.com/episode-177-honor-every-photon",
+ "authorName": "Chet Haase",
+ "publishDate": "2021-10-17T23:00:00.000Z",
+ "type": "Podcast ๐ŸŽ™",
+ "topics": [
+ "Camera",
+ "Graphics"
+ ],
+ "alternateVideo": {
+ "URL": "https://storage.googleapis.com/now-in-android/NIA049.mp4",
+ "startTimestamp": 233,
+ "endTimestamp": 287
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Accessibility series ๐ŸŒ - Touch targets",
+ "content": "The accessibility series continues on with more information on how to follow basic accessibility principles to make sure that your app can be used by as many users as possible.\nIn general, you should ensure that interactive elements have a width and height of at least 48dp! In the touch targets episode, youโ€™ll learn about a few ways in which you can make this happen.",
+ "URL": "https://www.youtube.com/watch?v=Dqqbe8IFBA4",
+ "authorName": "Shailen Tuli",
+ "publishDate": "2021-10-16T23:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "Accessibility"
+ ],
+ "alternateVideo": {
+ "URL": "https://storage.googleapis.com/now-in-android/NIA049.mp4",
+ "startTimestamp": 136,
+ "endTimestamp": 193
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Using the CameraX Exposure Compensation API",
+ "content": "This blog post by Wenhung Teng talks about how to use the CameraX Exposure Compensation that makes it much simpler to quickly take images with exceptional quality.",
+ "URL": "https://medium.com/androiddevelopers/using-camerax-exposure-compensation-api-11fd75785bf",
+ "authorName": "Wenhung Teng",
+ "publishDate": "2021-10-12T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Camera"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Compose for Wear OS in Developer preview โŒš",
+ "content": "Weโ€™re bringing the best of Compose to Wear OS as well, with built-in support for Material You to help you create beautiful apps with less code. Read the following article to review the main composables for Wear OS weโ€™ve built and point you towards resources to get started using them.",
+ "URL": "https://android-developers.googleblog.com/2021/10/compose-for-wear-os-now-in-developer.html",
+ "authorName": "Jeremy Walker",
+ "publishDate": "2021-10-11T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Wear",
+ "Compose"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Paging ๐Ÿ“‘ How to fetch data and bind the PagingData to the UI",
+ "content": "The series on Paging continues on with more content! In the second episode, TJ shows how to fetch data and bind the PagingData to the UI, including headers and footers.",
+ "URL": "https://www.youtube.com/watch?v=C0H54K63Lww",
+ "authorName": "TJ Dahunsi",
+ "publishDate": "2021-10-10T23:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "Paging"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Room adds support for Kotlin Symbol Processing",
+ "content": "Yigit Boyar wrote the story about how Room added support for Kotlin Symbol Processing (KSP). Spoiler: it wasnโ€™t easy, but it was definitely worth it.",
+ "URL": "https://medium.com/androiddevelopers/room-kotlin-symbol-processing-24808528a28e",
+ "authorName": "Yigit Boyar",
+ "publishDate": "2021-10-09T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Data Storage",
+ "Room"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Apply special effects to images with the CameraX Extensions API",
+ "content": "Have you ever wanted to apply special effects such as HDR or Night mode when taking pictures from your app? CameraX is here to help you! In this article by Charcoal Chen, learn how to do that using the new ExtensionsManager available in the camera-extensions Jetpack library. ",
+ "URL": "https://medium.com/androiddevelopers/apply-special-effects-to-images-with-the-camerax-extensions-api-d1a169b803d3",
+ "authorName": "Charcoal Chen",
+ "publishDate": "2021-10-06T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Camera"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 48,
+ "title": "Android Dev Summit returns on October 27-28, 2021! ๐Ÿ“†",
+ "content": "Join us October 27โ€“28 for Android Dev Summit 2021! The show kicks off at 10 AM PST on October 27 with The Android Show: a technical keynote where youโ€™ll hear all the latest developer news and updates. From there, we have over 30 sessions on a range of technical Android development topics, and weโ€™ll be answering your #AskAndroid questions live.",
+ "URL": "https://developer.android.com/dev-summit",
+ "authorName": "",
+ "publishDate": "2021-10-05T23:00:00.000Z",
+ "type": "Event ๐Ÿ“†",
+ "topics": [
+ "Events"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 48,
+ "title": "Android 12 is live in AOSP! ๐Ÿค–",
+ "content": "We released Android 12 and pushed it to the Android Open Source Project (AOSP). It will be coming to devices later on this year. Thank you for your feedback during the beta.\nAndroid 12 introduces a new design language called Material You along with redesigned widgets, notification UI updates, stretch overscroll, and app launch splash screens. We reduced the CPU time used by core system services, added performance class device capabilities, made ML accelerator drivers updatable outside of platform releases, and prevented apps from launching foreground services from the background and using notification trampolines to improve performance. The new Privacy Dashboard, approximate location, microphone and camera indicators/toggles, and nearby device permissions give users more insight into and control over privacy. We improved the user experience with a unified API for rich content insertion, compatible media transcoding, easier blurs and effects, AVIF image support, enhanced haptics, new camera effects/capabilities, improved native crash debugging, support for rounded screen corners, Play as you download, and Game Mode APIs.",
+ "URL": "https://android-developers.googleblog.com/2021/10/android-12-is-live-in-aosp.html",
+ "authorName": "Dave Burke",
+ "publishDate": "2021-10-03T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Android releases"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 48,
+ "title": "Improved Google Play Console user management ๐Ÿง‘โ€๐Ÿ’ผ",
+ "content": "The user and permission tools in Play Console have a new, decluttered interface and new team management features, making it easier to make sure every team member has the right set of permissions to fulfill their responsibilities without overexposing unrelated business data.\nWeโ€™ve rewritten permission names and descriptions, clarified differentiation between account and app-level permissions, added new search, filtering, and batch-editing capabilities, and added the ability to export this information to a CSV file. In addition, Play Console users can request access to actions with a justification, and weโ€™ve introduced permission groups to make it easier to assign multiple permissions at once to users that share the same or similar roles.",
+ "URL": "https://android-developers.googleblog.com/2021/09/improved-google-play-console-user.html",
+ "authorName": "Mike Yerou",
+ "publishDate": "2021-09-20T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Play"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 48,
+ "title": "Making Permissions auto-reset available to billions more devices ๐Ÿ”",
+ "content": "Android 11 introduced permission auto-reset, automatically resetting an appโ€™s runtime permissions when it isnโ€™t used for a few months. In December 2021, we are starting to roll this feature out to devices with Google Play services running Android 6.0 (API level 23) or higher for apps targeting Android 11 (API level 30) or higher. Users can manually enable permission auto-reset for apps targeting API levels 23 to 29.\nSome apps and permissions are automatically exempted from revocation, like active Device Administrator apps used by enterprises, and permissions fixed by enterprise policy. If your app is expected to work primarily in the background without user interaction, you can ask the user to prevent the system from resetting your appโ€™s permissions.",
+ "URL": "https://android-developers.googleblog.com/2021/09/making-permissions-auto-reset-available.html",
+ "authorName": "Peter Visontay",
+ "publishDate": "2021-09-16T23:00:00.000Z",
+ "type": "DAC - Android version features",
+ "topics": [
+ "Permissions"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 49,
+ "title": "Wear OS Jetpack libraries now in stable",
+ "content": "The Wear OS Jetpack libraries are now in stable.",
+ "URL": "https://android-developers.googleblog.com/2021/09/wear-os-jetpack-libraries-now-in-stable.html",
+ "authorName": "Jeremy Walker",
+ "publishDate": "2021-09-14T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Jetpack",
+ "Wear"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 45,
+ "title": "DataStore released into stable",
+ "content": "Datastore was released, providing a data storage solution that allows you to store key-value pairs or typed objects with protocol buffers.",
+ "URL": "https://developer.android.com/jetpack/androidx/releases/datastore#1.0.0",
+ "authorName": "",
+ "publishDate": "2021-08-03T23:00:00.000Z",
+ "type": "Jetpack release ๐Ÿš€",
+ "topics": [
+ "Data storage",
+ "DataStore"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 42,
+ "title": "DataStore reached release candidate status",
+ "content": "Jetpack Compose and DataStore have now reached release candidate status meaning the 1.0 stable releases are right around the corner!",
+ "URL": "https://developer.android.com/topic/libraries/architecture/datastore",
+ "authorName": "",
+ "publishDate": "2021-06-29T23:00:00.000Z",
+ "type": "Jetpack release ๐Ÿš€",
+ "topics": [
+ "DataStore",
+ "Data storage"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 42,
+ "title": "Scope Storage Myths",
+ "content": "Apps will be required to update their targetSdkVersion to API 30 in the second half of the year. That means your app will be required to work with Scoped Storage. In this blog post, Nicole Borrelli busts some Scope storage myths in a Q&A format.",
+ "URL": "https://medium.com/androiddevelopers/scope-storage-myths-ca6a97d7ff37",
+ "authorName": "Nicole Borrelli",
+ "publishDate": "2021-06-27T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Data storage",
+ "Scoped Storage"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 47,
+ "title": "Mad Skills: Hilt under the hood",
+ "content": "This episode dives into how the Hilt annotation processors generate code, and how the Hilt Gradle plugin works behind the scenes to improve the overall experience when using Hilt with Gradle.",
+ "URL": "https://medium.com/androiddevelopers/mad-skills-series-hilt-under-the-hood-9d89ee227059",
+ "authorName": "Brad Corso",
+ "publishDate": "2021-09-07T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Hilt",
+ "Mad Skills"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 47,
+ "title": "Mad Skills: Hilt extensions",
+ "content": "This episode explains how to write your own Hilt Extensions. Hilt Extensions allow you to extend Hilt support to new libraries. Extensions can be created for common patterns in projects, to support non-standard member injection, mirroring bindings, and more.",
+ "URL": "https://medium.com/androiddevelopers/hilt-extensions-in-the-mad-skills-series-f2ed6fcba5fe",
+ "authorName": "Daniel Santiago",
+ "publishDate": "2021-09-12T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Hilt",
+ "Mad Skills"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 47,
+ "title": "Mad Skills: Migrating from Dagger to Hilt",
+ "content": "While you will eventually want to migrate all your existing Dagger modules over to Hiltโ€™s built in components, you can start by migrating application-wide components to Hiltโ€™s singleton component. This episode explains how.",
+ "URL": "https://www.youtube.com/watch?v=Xt1_3Nq4lD0&t=15s",
+ "authorName": "Marcelo Hernandez",
+ "publishDate": "2021-09-19T23:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "Hilt",
+ "Mad Skills"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 47,
+ "title": "Trackr comes to the Big Screen",
+ "content": "A blog post on Trackr, a sample task management app where we showcase Modern Android Development best practices. This post takes you through how applying Material Design and responsive patterns produced a more refined and intuitive user experience on large screen devices.",
+ "URL": "https://medium.com/androiddevelopers/trackr-comes-to-the-big-screen-9f13c6f927bf",
+ "authorName": "Jonathan Koren",
+ "publishDate": "2021-09-06T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Large Screen",
+ "MAD",
+ "Material Design"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 47,
+ "title": "Accessibility services and the Android Accessibility model",
+ "content": "This Accessibilities series episode covers accessibility services like TalkBack, Switch Access and Voice Access and how they help users interact with your apps. Androidโ€™s accessibility framework allows you to write one app and the framework takes care of providing the information needed by different accessibility services.",
+ "URL": "https://youtu.be/LxKat_m7mHk",
+ "authorName": "Shailen Tuli",
+ "publishDate": "2021-09-02T23:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "Accessibility"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 47,
+ "title": "Labeling images for Accessibility",
+ "content": "This Accessibilities series episode covers labeling images for accessibility, such as content descriptions for ImageViews and ImageButtons.",
+ "URL": "https://youtu.be/O2DeSITnzFk",
+ "authorName": "Caren Chang",
+ "publishDate": "2021-09-09T23:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "Accessibility"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 47,
+ "title": "New Accessibility Pathway",
+ "content": "Want even more accessibility? You are in luck, check out this entire new learning pathway aimed at teaching you how to make your app more accessible.",
+ "URL": "https://developer.android.com/courses/pathways/make-your-android-app-accessible",
+ "authorName": "",
+ "publishDate": "",
+ "type": "",
+ "topics": [
+ "Accessibility"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 47,
+ "title": "AndroidX Activity Library 1.4.0-alpha01 released",
+ "content": "The AndroidX ComponentActivity now implements the MenuHost interface which allows any component to add menu items to the ActionBar by adding a MenuProvider instance to the activity.",
+ "URL": "https://developer.android.com/jetpack/androidx/releases/activity#1.4.0-alpha01",
+ "authorName": "",
+ "publishDate": "2021-08-31T23:00:00.000Z",
+ "type": "API change",
+ "topics": [
+ "AndroidX"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 47,
+ "title": "ADB Podcast Episode 174: Compose in Android Studio",
+ "content": "In this episode, Tor and Nick are joined by Chris Sinco, Diego Perez and Nicolas Roard to discuss the features added to Android Studio for Jetpack Compose. Tune in as they discuss the Compose preview, interactive preview, animation inspector, and additions to the Layout inspector along with their approach to creating tooling to support Composeโ€™s code-centric system.",
+ "URL": "",
+ "authorName": "Tor Norbye",
+ "publishDate": "2021-09-08T23:00:00.000Z",
+ "type": "Podcast ๐ŸŽ™",
+ "topics": [
+ "Android Studio",
+ "Jetpack Compose"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 47,
+ "title": "ADB Podcast Episode 175: Creating delightful user experiences with Lottie animations",
+ "content": "In this episode, Chet, Romain and Tor have a chat with Gabriel Peal from Tonal, well known for his contributions to the Android community on projects such as Mavericks and Lottie. They talked about Lottie and how it helps designers and developers deliver more delightful user experiences by taking complex animations designed in specialized authoring tools such as After Effects, and rendering them efficiently on mobile devices. They also explored the challenges of designing and implementing a rendering engine such as Lottie.",
+ "URL": "",
+ "authorName": "Chet Haase",
+ "publishDate": "2021-09-13T23:00:00.000Z",
+ "type": "Podcast ๐ŸŽ™",
+ "topics": [
+ "Animations"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 44,
+ "title": "Jetpack Compose 1.0 stable is released",
+ "content": "Jetpack Compose, Androidโ€™s modern, native UI toolkit is now stable and ready for you to adopt in production. It interoperates with your existing app, integrates with existing Jetpack libraries, implements Material Design with straightforward theming, supports lists with Lazy components using minimal boilerplate, and has a powerful, extensible animation system.",
+ "URL": "https://android-developers.googleblog.com/2021/07/jetpack-compose-announcement.html",
+ "authorName": "Anna-Chiara Bellini",
+ "publishDate": "2021-07-27T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Jetpack Compose"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 44,
+ "title": "Android Studio Artic Fox stable is released",
+ "content": "Android Studio Arctic Fox is now available in the stable release channel. Arctic Fox brings Jetpack Compose to life with Compose Preview, Deploy Preview, Compose support in the Layout Inspector, and Live Editing of literals. Compose Preview works with the @Preview annotation to let you instantly see the impact of changes across multiple themes, screen sizes, font sizes, and more. Deploy Preview deploys snippets of your Compose code to a device or emulator for quick testing. Layout inspector now works with apps written fully in Compose as well as apps that have Compose alongside Views, allowing you to explore your layouts and troubleshoot. With Live Edit of literals, you can edit literals such as strings, numbers, booleans, etc. and see the immediate results change in previews, the emulator, or on a physical device โ€” all without having to compile.\n",
+ "URL": "https://android-developers.googleblog.com/2021/07/android-studio-arctic-fox-202031-stable.html",
+ "authorName": "Amanda Alexander",
+ "publishDate": "2021-07-27T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Android Studio",
+ "Jetpack Compose"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 44,
+ "title": "User control, privacy, security, and safety",
+ "content": "Play announced new updates to bolster user control, privacy, and security. The post covered advertising ID updates, including zeroing out the advertising ID when users opt out of interest-based advertising or ads personalization, the developer preview of the app set ID, enhanced protection for kids, and policy updates around dormant accounts and users of the AccessibilityService API.",
+ "URL": "https://android-developers.googleblog.com/2021/07/announcing-policy-updates-to-bolster.html",
+ "authorName": "Krish Vitaldevara",
+ "publishDate": "2021-07-27T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Google Play"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 44,
+ "title": "MAD Skills: Performance",
+ "content": "The MAD Skills series continues with more technical content about modern Android development.\nThis week continues Performance, which covers how to use both system tracing and sampling profiling to debug performance issues in apps.\nCarmen has released two more episodes. The first episode dives deeper into system trace profiling within Android Studio with a detailed walkthrough of app startup performance.",
+ "URL": "https://www.youtube.com/watch?v=aUrqx9AnDUg",
+ "authorName": "Carmen Jackson",
+ "publishDate": "2021-07-25T23:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "MAD Skills",
+ "Performance"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 44,
+ "title": "ADB Podcast Episode 171",
+ "content": "ADB released episode #171, part of our continuing series on Jetpack Compose. In this episode, Nick and Romain are joined by Filip Pavlis, Jelle Fresen & Jose Alcรฉrreca to talk about Testing in Compose. They discuss how Composeโ€™s testing APIs were developed hand-in-hand with the UI toolkit, making them more deterministic and opening up new possibilities like manipulating time. They go on to discuss the semantics tree, interop testing, screenshot testing and the possibilities for host-side testing.",
+ "URL": "https://adbackstage.libsyn.com/episode-171-compose-testing",
+ "authorName": "Android Developers Backstage",
+ "publishDate": "",
+ "type": "Podcast ๐ŸŽ™",
+ "topics": [
+ "Jetpack Compose",
+ "Testing"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 41,
+ "title": "Android 12 Beta 2 Update",
+ "content": "The second Beta of Android 12 has just been released for you to try. Beta 2 adds new privacy features like the Privacy Dashboard and continues our work of refining the release.",
+ "URL": "https://android-developers.googleblog.com/2021/06/android-12-beta-2-update.html",
+ "authorName": "Dave Burke",
+ "publishDate": "2021-06-08T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Android releases"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 41,
+ "title": "Grow Your Indie Game with Help From Google Play",
+ "content": "Google Play is opening submissions for two of our annual developer programs - the Indie Games Accelerator and the Indie Games Festival. These programs are designed to help small games studios grow on Google Play, no matter what stage they are in",
+ "URL": "https://developers.googleblog.com/2021/06/grow-your-indie-game-with-help-from-google-play.html",
+ "authorName": "Patricia Correa",
+ "publishDate": "2021-05-31T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Play",
+ "Games"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 41,
+ "title": "Mad Skills: Navigation with Multiple back stacks",
+ "content": "As part of the rercommended Material pattern for bottom-navigation, the Jetpack Navigation librar y makes it easy to implement navigation with multiple back-stacks",
+ "URL": "https://medium.com/androiddevelopers/navigation-multiple-back-stacks-6c67ba41952f",
+ "authorName": "Murat Yener",
+ "publishDate": "2021-06-14T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Navigation",
+ "Mad Skills"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 41,
+ "title": "Mad Skills: Navigation in Feature Modules",
+ "content": "Feature modules delivered with Play Feature delivery at not downloadedd at install time, but only when the app requestss them. Learn how to use the dynamic features navigation library to include the graph from the feature module.",
+ "URL": "https://medium.com/androiddevelopers/navigation-in-feature-modules-322ac3d79334",
+ "authorName": "Murat Yener",
+ "publishDate": "2021-06-01T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Navigation",
+ "Mad Skills"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 41,
+ "title": "Android @ Google I/O: 3 things to know in Modern Android Development",
+ "content": "This yearโ€™s Google I/O brought lots of updates for Modern Android Development. Learn about the top 3 things you should know.",
+ "URL": "https://android-developers.googleblog.com/2021/05/mad-spotlight.html",
+ "authorName": "The Modern Android Development Team",
+ "publishDate": "2021-05-24T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Android releases",
+ "MAD"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 41,
+ "title": "Top 3 things in Android 12 | Android @ Google I/O '21",
+ "content": "Did you miss the latest in Android 12 at Google I/O 2021? Android Software Engineer Chet Haase will recap the top three themes in Android 12 from this yearโ€™s Google I/O!",
+ "URL": "https://www.youtube.com/watch?v=tvf1wmD5H0M",
+ "authorName": "Chet Haase",
+ "publishDate": "2021-06-08T23:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "Android Releases"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 41,
+ "title": "Building across devices | Android @ Google I/O '21",
+ "content": "Did you miss the latest in Building across screens at Google I/O 2021? Product Manager Diana Wong will recap the top three announcements from this yearโ€™s Google I/O!",
+ "URL": "https://www.youtube.com/watch?v=O5oRiIUk_F4",
+ "authorName": "Diana Wong",
+ "publishDate": "2021-06-02T23:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "Form Factors"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 41,
+ "title": "Multiple Back Stacks",
+ "content": "A deep dive into multiple back stacks and some of the work it took to make this feature happen in Fragments and Navigation",
+ "URL": "https://medium.com/androiddevelopers/multiple-back-stacks-b714d974f134",
+ "authorName": "Ian Lake",
+ "publishDate": "2021-06-06T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Navigation",
+ "Fragments"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 41,
+ "title": "Build sophisticated search features with AppSearch",
+ "content": "AppSearch is an on-device search library which provides high performance and feature-rich full-text search functionality. Learn how to use the new Jetpack AppSearch library for doing high-performance on-device full text searches.",
+ "URL": "https://android-developers.googleblog.com/2021/06/sophisticated-search-with-appsearch-in-jetpack.html",
+ "authorName": "Dan Saadati",
+ "publishDate": "2021-06-13T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "AppSearch"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 41,
+ "title": "Untrusted Touch Events in Android",
+ "content": "Android 12 prevents touch events from being deliverred if these touches first pass through a window from a different app to ensure users can see what they are interacting with. Learn about alternatives, to see if your app will be affected and how you can test to see if your app will be impacted.",
+ "URL": "https://medium.com/androiddevelopers/untrusted-touch-events-2c0e0b9c374c",
+ "authorName": "Meghan Mehta",
+ "publishDate": "2021-05-25T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Andriod releases"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 41,
+ "title": "Create an application CorouotineScope using Hilt",
+ "content": "Learn how to create an applicatioon-scoped CoroutineScope using Hilt, and how to inject it as a dependency.",
+ "URL": "https://medium.com/androiddevelopers/create-an-application-coroutinescope-using-hilt-dd444e721528",
+ "authorName": "Manuel Vivo",
+ "publishDate": "2021-06-09T23:00:00.000Z",
+ "type": "Article ๐Ÿ“š",
+ "topics": [
+ "Coroutine",
+ "Hilt"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 41,
+ "title": "ADB Podcast Episode 165: Material Witnesses",
+ "content": "In this episode, Chet and Romain chattedd with Hunter and Nick from the Material Design team about recent additions and improvements to the Material Design Component libraries: transitions, motion theming, Compose, large screens support and guidance, etc.",
+ "URL": "http://adbackstage.libsyn.com/episode-165-material-witnesses",
+ "authorName": "Chet Haase",
+ "publishDate": "2021-06-01T23:00:00.000Z",
+ "type": "Podcast ๐ŸŽ™",
+ "topics": [
+ "Material Design"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 41,
+ "title": "ADB Podcast Episode 166: Security Deposit",
+ "content": "In this episode, Chad and Jeff from the Android Security team join Tor and Romain to talk aboutโ€ฆ security. They explain what the platform does to help preserve user trust and device integrity, why it sometimes means restricting existing APIs, and touch on what apps can do or should worry about.",
+ "URL": "http://adbackstage.libsyn.com/episode-166-security-deposit",
+ "authorName": "Tor Norbye",
+ "publishDate": "2021-06-07T23:00:00.000Z",
+ "type": "Podcast ๐ŸŽ™",
+ "topics": [
+ "Security"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ },
+ {
+ "episode": 41,
+ "title": "ADB Podcast Episode 167: Jetpack Compose Layout",
+ "content": "In this second episode of our mini-series on Jetpack Compose (AD/BC), Nick and Romain are joined by Anastasia Soboleva, George Mount and Mihai Popa to talk about Composeโ€™s layout system. They explain how the Compose layout model works and its benefits, introduce common layout composables, discuss how writing your own layout is far simpler than Views, and how you can even animate layout.",
+ "URL": "https://adbackstage.libsyn.com/episode-167-jetpack-compose-layout",
+ "authorName": "Nick Butcher",
+ "publishDate": "2021-06-13T23:00:00.000Z",
+ "type": "Podcast ๐ŸŽ™",
+ "topics": [
+ "Compose"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": 0,
+ "endTimestamp": 0
+ }
+ }
+ ]
+}
diff --git a/app/src/test/java/com/google/samples/apps/nowinandroid/data/news/fake/FakeNewsResourceRepositoryTest.kt b/app/src/test/java/com/google/samples/apps/nowinandroid/data/news/fake/FakeNewsResourceRepositoryTest.kt
new file mode 100644
index 000000000..b6c39cd7b
--- /dev/null
+++ b/app/src/test/java/com/google/samples/apps/nowinandroid/data/news/fake/FakeNewsResourceRepositoryTest.kt
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.samples.apps.nowinandroid.data.news.fake
+
+import android.content.Context
+import android.content.res.Resources
+import com.google.samples.apps.nowinandroid.R
+import io.mockk.every
+import io.mockk.mockk
+import kotlinx.coroutines.runBlocking
+import org.junit.Before
+
+class FakeNewsResourceRepositoryTest {
+
+ private lateinit var subject: FakeNewsResourceRepository
+
+ @Before
+ fun setup() {
+ val context = mockk<Context>()
+ val resources = mockk<Resources>()
+ every { resources.openRawResource(R.raw.data) } returns testResourcesJson.byteInputStream()
+ every { context.resources } returns resources
+
+ subject = FakeNewsResourceRepository(context)
+ }
+
+ @org.junit.Test
+ fun newsResources() = runBlocking {
+ // TODO: Implement this
+ // assertEquals(listOf<NewsResource>(), subject.monitor().first())
+ }
+}
+
+private val testResourcesJson = """
+ [
+ {
+ "episode": 52,
+ "title": "MAD Skills: Paging Q&A",
+ "content": "In this live session, TJ and Dustin answered your questions in the usual live Q&A format.",
+ "URL": "https://youtu.be/8i6vrlbIVCc",
+ "authorName": "",
+ "publishDate": "2021-11-11T00:00:00.000Z",
+ "type": "Video ๐Ÿ“บ",
+ "topics": [
+ "MAD Skills",
+ "Paging"
+ ],
+ "alternateVideo": {
+ "URL": "",
+ "startTimestamp": "",
+ "endTimestamp": ""
+ }
+ }
+ ]
+""".trimIndent()
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 0417b9519..fcbf85262 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -17,6 +17,7 @@ kotlin = "1.6.0"
kotlinxCoroutines = "1.5.2"
ktlint = "0.43.0"
material3 = "1.5.0-alpha05"
+mockk = "1.12.1"
spotless = "6.0.0"
[libraries]
@@ -46,6 +47,7 @@ junit4 = { group = "junit", name = "junit", version.ref = "junit4" }
kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinxCoroutines" }
material3 = { group = "com.google.android.material", name = "material", version.ref = "material3" }
+mockk = { group = "io.mockk", name = "mockk", version.ref = "mockk" }
[plugins]
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }