From 72788223d283c64efff40e4d6160ea5759a62208 Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Sat, 29 Jul 2023 12:18:08 +0100 Subject: [PATCH 1/4] Update README.md to mention `prodRelease` variant and remove the "in open beta" now that it has been published. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1b1fb795e..a40aca6df 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ follows Android design and development best practices and is intended to be a us for developers. As a running app, it's intended to help developers keep up-to-date with the world of Android development by providing regular news updates. -The app is currently in development. The `demoRelease` variant is [available on the Play Store in open beta](https://play.google.com/store/apps/details?id=com.google.samples.apps.nowinandroid). +The app is currently in development. The `prodRelease` variant is [available on the Play Store](https://play.google.com/store/apps/details?id=com.google.samples.apps.nowinandroid). # Features From 4eeb045287f3d2158f8fc49f9cd94595fe3a7b58 Mon Sep 17 00:00:00 2001 From: Tatsuya Fujisaki <1838962+tatsuyafujisaki@users.noreply.github.com> Date: Wed, 2 Aug 2023 22:40:38 +0900 Subject: [PATCH 2/4] Rename constants --- .../core/network/retrofit/RetrofitNiaNetwork.kt | 6 +++--- .../interests/navigation/InterestsNavigation.kt | 6 +++--- .../nowinandroid/sync/initializers/SyncWorkHelpers.kt | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/network/src/main/java/com/google/samples/apps/nowinandroid/core/network/retrofit/RetrofitNiaNetwork.kt b/core/network/src/main/java/com/google/samples/apps/nowinandroid/core/network/retrofit/RetrofitNiaNetwork.kt index 7e9122ca8..b86036ff0 100644 --- a/core/network/src/main/java/com/google/samples/apps/nowinandroid/core/network/retrofit/RetrofitNiaNetwork.kt +++ b/core/network/src/main/java/com/google/samples/apps/nowinandroid/core/network/retrofit/RetrofitNiaNetwork.kt @@ -57,10 +57,10 @@ private interface RetrofitNiaNetworkApi { ): List } -private const val NiaBaseUrl = BuildConfig.BACKEND_URL +private const val NIA_BASE_URL = BuildConfig.BACKEND_URL /** - * Wrapper for data provided from the [NiaBaseUrl] + * Wrapper for data provided from the [NIA_BASE_URL] */ @Serializable private data class NetworkResponse( @@ -77,7 +77,7 @@ class RetrofitNiaNetwork @Inject constructor( ) : NiaNetworkDataSource { private val networkApi = Retrofit.Builder() - .baseUrl(NiaBaseUrl) + .baseUrl(NIA_BASE_URL) .callFactory(okhttpCallFactory) .addConverterFactory( networkJson.asConverterFactory("application/json".toMediaType()), diff --git a/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/navigation/InterestsNavigation.kt b/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/navigation/InterestsNavigation.kt index bef6987f4..7558ec48d 100644 --- a/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/navigation/InterestsNavigation.kt +++ b/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/navigation/InterestsNavigation.kt @@ -23,11 +23,11 @@ import androidx.navigation.compose.composable import androidx.navigation.navigation import com.google.samples.apps.nowinandroid.feature.interests.InterestsRoute -private const val interestsGraphRoutePattern = "interests_graph" +private const val INTERESTS_GRAPH_ROUTE_PATTERN = "interests_graph" const val interestsRoute = "interests_route" fun NavController.navigateToInterestsGraph(navOptions: NavOptions? = null) { - this.navigate(interestsGraphRoutePattern, navOptions) + this.navigate(INTERESTS_GRAPH_ROUTE_PATTERN, navOptions) } fun NavGraphBuilder.interestsGraph( @@ -35,7 +35,7 @@ fun NavGraphBuilder.interestsGraph( nestedGraphs: NavGraphBuilder.() -> Unit, ) { navigation( - route = interestsGraphRoutePattern, + route = INTERESTS_GRAPH_ROUTE_PATTERN, startDestination = interestsRoute, ) { composable(route = interestsRoute) { diff --git a/sync/work/src/main/java/com/google/samples/apps/nowinandroid/sync/initializers/SyncWorkHelpers.kt b/sync/work/src/main/java/com/google/samples/apps/nowinandroid/sync/initializers/SyncWorkHelpers.kt index a3cff5fb9..5abf2eee5 100644 --- a/sync/work/src/main/java/com/google/samples/apps/nowinandroid/sync/initializers/SyncWorkHelpers.kt +++ b/sync/work/src/main/java/com/google/samples/apps/nowinandroid/sync/initializers/SyncWorkHelpers.kt @@ -28,8 +28,8 @@ import androidx.work.NetworkType import com.google.samples.apps.nowinandroid.sync.R const val SYNC_TOPIC = "sync" -private const val SyncNotificationId = 0 -private const val SyncNotificationChannelID = "SyncNotificationChannel" +private const val SYNC_NOTIFICATION_ID = 0 +private const val SYNC_NOTIFICATION_CHANNEL_ID = "SyncNotificationChannel" // All sync work needs an internet connectionS val SyncConstraints @@ -42,7 +42,7 @@ val SyncConstraints * run with a foreground service */ fun Context.syncForegroundInfo() = ForegroundInfo( - SyncNotificationId, + SYNC_NOTIFICATION_ID, syncWorkNotification(), ) @@ -53,7 +53,7 @@ fun Context.syncForegroundInfo() = ForegroundInfo( private fun Context.syncWorkNotification(): Notification { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { val channel = NotificationChannel( - SyncNotificationChannelID, + SYNC_NOTIFICATION_CHANNEL_ID, getString(R.string.sync_notification_channel_name), NotificationManager.IMPORTANCE_DEFAULT, ).apply { @@ -68,7 +68,7 @@ private fun Context.syncWorkNotification(): Notification { return NotificationCompat.Builder( this, - SyncNotificationChannelID, + SYNC_NOTIFICATION_CHANNEL_ID, ) .setSmallIcon( com.google.samples.apps.nowinandroid.core.common.R.drawable.ic_nia_notification, From a23ffab60217bfecdb0b907b73c8508f46df5308 Mon Sep 17 00:00:00 2001 From: AlirezaJoon Date: Wed, 9 Aug 2023 09:24:45 +0330 Subject: [PATCH 3/4] fix: add label to animations for fixing lint issue --- .../nowinandroid/core/designsystem/component/LoadingWheel.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/designsystem/src/main/java/com/google/samples/apps/nowinandroid/core/designsystem/component/LoadingWheel.kt b/core/designsystem/src/main/java/com/google/samples/apps/nowinandroid/core/designsystem/component/LoadingWheel.kt index 55ff143a6..10ef1bfce 100644 --- a/core/designsystem/src/main/java/com/google/samples/apps/nowinandroid/core/designsystem/component/LoadingWheel.kt +++ b/core/designsystem/src/main/java/com/google/samples/apps/nowinandroid/core/designsystem/component/LoadingWheel.kt @@ -55,7 +55,7 @@ fun NiaLoadingWheel( contentDesc: String, modifier: Modifier = Modifier, ) { - val infiniteTransition = rememberInfiniteTransition() + val infiniteTransition = rememberInfiniteTransition(label = "wheel transition") // Specifies the float animation for slowly drawing out the lines on entering val startValue = if (LocalInspectionMode.current) 0F else 1F @@ -82,6 +82,7 @@ fun NiaLoadingWheel( animationSpec = infiniteRepeatable( animation = tween(durationMillis = ROTATION_TIME, easing = LinearEasing), ), + label = "wheel rotation animation", ) // Specifies the color animation for the base-to-progress line color change @@ -100,6 +101,7 @@ fun NiaLoadingWheel( repeatMode = RepeatMode.Restart, initialStartOffset = StartOffset(ROTATION_TIME / NUM_OF_LINES / 2 * index), ), + label = "wheel color animation", ) }