Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simple media app guide for a newbie #1259

Answered by dsjstc
dsjstc asked this question in Q&A
Discussion options

I'd like to follow this Simple Media Player guide, but it doesn't trivially build.

My last android project was before Compose, so I don't really know what I'm looking at... but I think the PlayerScreen instructions need to be updated. I can't make it compile with a relatively recent install of Electric Eel, with what I think are the current Compose dependencies.

Can someone please link me to a version of this project updated to use current libraries, or with a functional build.gradle pointing to the old ones that worked when the page was published?

You must be logged in to vote

Turns out my Studio install was badly broken. This recipe is working fine on Eel after a reinstall.

As long as I'm here though, here are two minor points that could smooth the path for future newbies:

  • Guide says add media-ui dependency to project build.grade. I could only make it work at the bottom of the app build.gradle.
  • Guide uses undefined gradle variables $horologist_version and $media3_version. I defined them in gradle.properties, but maybe for simplicity the guide should just hardcode current-as-of-now version numbers.

Thanks again, this is awesome!

Replies: 2 comments 3 replies

Comment options

As a starting point, try opening the Horologist project in Android Studio Flamingo. You should be able to immediately run the media/sample app.

If there are problems with the examples compiling can you post them in a bug and we can fix. Thanks for flagging this.

You must be logged in to vote
0 replies
Comment options

but it doesn't trivially build.

Could you please paste the text or a screenshot of the error you are seeing?

You must be logged in to vote
3 replies
Comment options

fyi we've made some improvements to the guide and fixed some issues with the code

Comment options

Turns out my Studio install was badly broken. This recipe is working fine on Eel after a reinstall.

As long as I'm here though, here are two minor points that could smooth the path for future newbies:

  • Guide says add media-ui dependency to project build.grade. I could only make it work at the bottom of the app build.gradle.
  • Guide uses undefined gradle variables $horologist_version and $media3_version. I defined them in gradle.properties, but maybe for simplicity the guide should just hardcode current-as-of-now version numbers.

Thanks again, this is awesome!

Answer selected by luizgrp
Comment options

Thanks for confirming!
For future reference, this repo has the code of that guide in a wear app, ready to be run.
The first part of the guide is in the main branch, the second part is in the functional branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /