Skip to content

Conversation

@yrezgui
Copy link
Contributor

@yrezgui yrezgui commented Jan 9, 2026

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @yrezgui, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on standardizing the source of static video assets used within the Android AI samples. By updating the URLs to a unified androiddevelopers/samples_assets Google Cloud Storage bucket, the change aims to improve asset management, ensure consistency, and potentially enhance the reliability of sample media access across different modules.

Highlights

  • Static Asset URL Updates: All hardcoded static asset URLs for video samples have been updated across various Kotlin files. The old URLs pointing to commondatastorage.googleapis.com and exoplayer-test-media-0 have been replaced with a new, consolidated path under storage.googleapis.com/androiddevelopers/samples_assets/.
  • Affected Files: The changes impact VideoList.kt in both gemini-video-metadata-creation and gemini-video-summarization samples, as well as VideoPlayer.kt in the ui-component module. These files contained lists of VideoItem or VideoPickerData objects with the outdated URLs.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly updates the URLs for static video assets across the sample applications. However, this change introduces significant duplication of hardcoded URL strings in multiple files. My review includes suggestions to refactor these URLs into constants to improve the code's maintainability and make future updates easier and less error-prone, following the DRY (Don't Repeat Yourself) principle.

Comment on lines 33 to 49
"https://storage.googleapis.com/androiddevelopers/samples_assets/exoplayer-test-media-0/shorts_android_developers/shorts_10.mp4".toUri(),
),
VideoItem(
R.string.video_title_big_buck_bunny,
"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4".toUri(),
"https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/BigBuckBunny.mp4".toUri(),
),
VideoItem(
R.string.video_title_tears_of_steel,
"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/TearsOfSteel.mp4".toUri(),
"https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/TearsOfSteel.mp4".toUri(),
),
VideoItem(
R.string.video_title_for_bigger_blazes,
"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4".toUri(),
"https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/ForBiggerBlazes.mp4".toUri(),
),
VideoItem(
R.string.video_title_for_bigger_escape,
"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4".toUri(),
"https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/ForBiggerEscapes.mp4".toUri(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve maintainability and avoid repeating the same URLs, consider extracting these hardcoded video URLs into constants. You could define a common base URL and then construct the full URLs from it. This would make future updates much easier.

For example:

private const val BASE_URL = "https://storage.googleapis.com/androiddevelopers/samples_assets"
private const val GTV_BUCKET_URL = "$BASE_URL/gtv-videos-bucket/sample"

private const val BIG_BUCK_BUNNY_URL = "$GTV_BUCKET_URL/BigBuckBunny.mp4"
// ... and so on for other videos

Then you can use BIG_BUCK_BUNNY_URL.toUri() in your VideoItem definitions.

References
  1. To adhere to the Don't Repeat Yourself (DRY) principle, avoid duplicating hardcoded values. Extracting them into constants improves maintainability and reduces the risk of errors during updates.

Comment on lines 33 to 53
"https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/BigBuckBunny.mp4".toUri(),
),
VideoItem(
R.string.video_title_android_spotlight_shorts,
"https://storage.googleapis.com/exoplayer-test-media-0/shorts_android_developers/shorts_10.mp4".toUri(),
"https://storage.googleapis.com/androiddevelopers/samples_assets/exoplayer-test-media-0/shorts_android_developers/shorts_10.mp4".toUri(),
),
VideoItem(
R.string.video_title_youtube_google_tv,
"https://www.youtube.com/watch?v=QFMIP5GOo70".toUri(),
),
VideoItem(
R.string.video_title_tears_of_steel,
"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/TearsOfSteel.mp4".toUri(),
"https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/TearsOfSteel.mp4".toUri(),
),
VideoItem(
R.string.video_title_for_bigger_blazes,
"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4".toUri(),
"https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/ForBiggerBlazes.mp4".toUri(),
),
VideoItem(
R.string.video_title_for_bigger_escape,
"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4".toUri(),
"https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/ForBiggerEscapes.mp4".toUri(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the other video list, these hardcoded URLs are duplicated. To improve maintainability, it's recommended to extract them into constants. This will centralize the URLs and make them easier to manage and update.

For example:

private const val BASE_URL = "https://storage.googleapis.com/androiddevelopers/samples_assets"
private const val GTV_BUCKET_URL = "$BASE_URL/gtv-videos-bucket/sample"

private const val BIG_BUCK_BUNNY_URL = "$GTV_BUCKET_URL/BigBuckBunny.mp4"
// ... and so on for other videos

This approach reduces redundancy and the risk of inconsistencies.

References
  1. To adhere to the Don't Repeat Yourself (DRY) principle, avoid duplicating hardcoded values. Extracting them into constants improves maintainability and reduces the risk of errors during updates.

Comment on lines 250 to 252
VideoPickerData("Big Buck Bunny", "https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/BigBuckBunny.mp4".toUri()),
VideoPickerData("Tears of Steel", "https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/TearsOfSteel.mp4".toUri()),
VideoPickerData("For Bigger Blazes", "https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/ForBiggerBlazes.mp4".toUri()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These sample video URLs are hardcoded and duplicated in other parts of the project. To improve code maintainability and reduce redundancy, consider extracting these URLs into constants. Ideally, these constants would live in a shared location so they can be reused across all sample lists.

Example:

private const val BASE_URL = "https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample"
private const val BIG_BUCK_BUNNY_URL = "$BASE_URL/BigBuckBunny.mp4"
References
  1. To adhere to the Don't Repeat Yourself (DRY) principle, avoid duplicating hardcoded values. Extracting them into constants improves maintainability and reduces the risk of errors during updates.

Copy link
Collaborator

@lethargicpanda lethargicpanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you remove the changes in the geminilivetodo sample.
I think they are just linting/detekt changes but to make this PR cleaner, let's remove it and we'll fix it separately.


import kotlin.random.Random


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this, I will run detekt in a separate PR.

fun getTodoList(): List<Todo> = _todos.value

fun addTodo(taskDescription: String) : Int? {
fun addTodo(taskDescription: String): Int? {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this.

@yrezgui yrezgui merged commit 06167f5 into main Jan 11, 2026
1 check passed
@yrezgui yrezgui deleted the yrezgui/static-assets branch January 11, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants