mvysny / photocloud-frame-slideshow

Android Digital Photo Frame
https://www.android-photo-frame.eu
14 stars 1 forks source link

AndroidTV OS 12 - ADB command for ambient mode? #179

Closed julianquandt closed 1 year ago

julianquandt commented 1 year ago

Hi Martin,

First of all: Thanks for developing this app, I really like it and it works great.

The only problem that I am having currently is that AndroidTV OS 12 on my CCwGTV does not allow me to set this (or any) app to be used in ambient mode anymore, which might be a bug, but could also be a feature given that google is trying to push commercials in ambient mode apparently.

As it seems to be currently unknown when and if it will be possible to use custom ambient apps again, I was wondering whether it is possible to run the app as screensaver using an ADB command in developer mode (like mentioned here: https://stackoverflow.com/questions/73219009/settings-to-set-a-screen-saver-are-not-showing-on-google-chromecast) and if so, whether you could let me know which command to run.

Thanks in advance.

Best, Julian

mvysny commented 1 year ago

Hi Julian, thank you so much, I'm happy to hear that the app works for you well.

At the moment PhotoCloud uses the official way: it exposes the android.service.dreams.DreamService action of its frame.DaydreamService service. It works on phones, but apparently doesn't work on your TV properly, so a workaround may be necessary.

I do not know what the Ambient mode is, but the issue you linked refers to Daydream, so I assume it's the same thing. However, I'm at loss on how the ticket is helpful in your situation. The question is from a developer trying to start the Daydream programmatically, while in your case you'd like to start the Daydream by the OS... However, if you can run adb then you can start PhotoCloud using adb the following way (tips found here):

adb shell am start -a "sk.baka.photoframe.START_SLIDESHOW"

Also see https://www.android-photo-frame.eu/faq.html, the "Tasker" question.

Please let me know whether this helps.

julianquandt commented 1 year ago

Hi Martin,

EDIT: I figured out my mistake and now the following works.

Thanks for the quick reply, this was the info I needed. What I wanted to achieve is to expose the daydream service to the settings of CCwGTV, because AndroidTV OS 12 would not allow users to choose 3rd party daydream services anymore (only the Google version called Ambient mode).

It is however possible to expose the daydream service to the settings of the device using the following command:

adb shell settings put secure screensaver_components sk.baka.photoframe/.frame.DaydreamService

Thanks again :) and cheers!

mvysny commented 1 year ago

Ah, perfect! Wow, that is some excellent underground find. I'm happy that the solution is working for you, and it's good to have it documented here in the issue tracker. Since everything seems to be working, I'll close the ticket now. Best regards and hats off for finding this solution