Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Media Player Widget Design #1999

Merged
merged 5 commits into from Dec 18, 2021

Conversation

jannis3005
Copy link
Contributor

Summary

Updated the Media Player Widget Design. It's now showing Artist, Title and album name if available. it also now updates more frequently when something is currently playing.

Screenshots

Screenshot_1639070705
Screenshot_1639070738

Link to pull request in Documentation repository

Looking at the Docs for the Media Player Widget I don't think this needs a documentation update, as it essentially works the same as it did previously regarding user interaction.

Any other notes

…if available. update widget more frequently when something is playing.
@homeassistant
Copy link
Contributor

Hi @jannis3005,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@dshokouhi
Copy link
Member

Thanks for your PR 🙏 I dig the design updates! I do agree docs updates are not needed here :)

@jannis3005
Copy link
Contributor Author

I also thought about adding a little icon in the top right indicating the source (possibly the icon of the media player entity) but I did not yet figure out how to convert the string (mdi:whatever) into something I can put into an image view.

@dshokouhi
Copy link
Member

I also thought about adding a little icon in the top right indicating the source (possibly the icon of the media player entity) but I did not yet figure out how to convert the string (mdi:whatever) into something I can put into an image view.

I did this recently for the notification icon actually :) Hopefully this will help

https://github.com/home-assistant/android/blob/master/app/src/full/java/io/homeassistant/companion/android/notifications/MessagingService.kt#L776-L778

Also if you need any help or have questions you can always feel free to join us in discord #devs_mobile_apps :)

@jannis3005
Copy link
Contributor Author

jannis3005 commented Dec 13, 2021

I also thought about adding a little icon in the top right indicating the source (possibly the icon of the media player entity) but I did not yet figure out how to convert the string (mdi:whatever) into something I can put into an image view.

I did this recently for the notification icon actually :) Hopefully this will help

https://github.com/home-assistant/android/blob/master/app/src/full/java/io/homeassistant/companion/android/notifications/MessagingService.kt#L776-L778

Also if you need any help or have questions you can always feel free to join us in discord #devs_mobile_apps :)

image
image

What do you think @dshokouhi? Still need to sort the state updating though. Haven't figured it out yet. Okay in theory it should work now. but It doesn't 🤣

@jannis3005
Copy link
Contributor Author

I've cleaned up the code. hopefully, it is in a good state now. I think the design is also final and it is working much better than previously.

@dshokouhi
Copy link
Member

image image

What do you think @dshokouhi?

I think this design looks awesome, good job!

Copy link
Member

@dshokouhi dshokouhi left a comment

Choose a reason for hiding this comment

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

Tested the debug APK and it all seems to work. The only consideration we have here is that I noticed there are a lot of image updates going on so it does have the potential to rack up data with instant updates. I wonder if the image should only be updated when a state has changed to reduce the amount of updates there? We can wait for another review before we make a decision on the amount of image updates. The updated design is nice, do we think we should update the preview image to match the updated design?

Copy link
Collaborator

@JBassett JBassett left a comment

Choose a reason for hiding this comment

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

I think Picasso has some caching by default so loading the same URL should result in a pull from cache not a downloading every time but we should double check.

@JBassett JBassett merged commit f53d2d9 into home-assistant:master Dec 18, 2021
@jannis3005 jannis3005 deleted the new-musik-player-widget branch May 16, 2022 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants