spocky / miproja1

328 stars 9 forks source link

Add "Tuner" to the Inputs list #50

Open githottub opened 7 months ago

githottub commented 7 months ago

App Version: 4.36 OS: Android 12 Device: 2023 model TV running Google TV

When choosing the Live TV app (the TV's internal app to watch Live TV through the built-in tuner) about half the time it goes to the tuner like it should but half the time it goes to the last HDMI input used instead. This never happened with the default launcher; it always properly went to the tuner.

spocky commented 7 months ago

Hi,

Can you check if the behavior is the same when Projectivy's accessibility service is disabled ? If I remember well, live tv shows strange behavior when any accessibility service is enabled. If this fixes your issue, then the solution is in Google's hands.

githottub commented 7 months ago

Can you check if the behavior is the same when Projectivy's accessibility service is disabled ?

Still happens with it disabled. To make matters worse, unlike the TV's default interface, which includes the live tv tuner as one of the inputs, Projectivy doesn't... which means I can't even try that as a potential workaround when choosing the Live TV app in Projectivy incorrectly switches to the last HDMI input rather than the internal tuner.

githottub commented 7 months ago

@spocky If there's anything further I can do to help resolve this bug with the Live TV app going to the last used input rather than the TV tuner, please let me know. At the very least, if you could just get Projectivy's list of inputs to include the TV tuner (like the TV's default input menu does) that would provide the basic level of functionality most users would require. I'm sure you would agree that Projectivy should offer a way to access the TV's internal tuner. Thanks!

spocky commented 7 months ago

I suppose the bug with the last HDMI input is related to the device implementation of Live Tv. Projectivy starts all apps the same way, there's no reason I can see it would act differently for this app.

But maybe I misunderstood : you seem to say it acts randomly. Could you try the following :

If so, this is probably because the same app (Live Tv) is used to display Tuner channels and HDMI inputs. By using Home button to exit Live Tv, you don't kill it. Then launching it again, it will show the last thing it did before (the hdmi input). Probably using the back button to exit will show a different behavior but it's not even sure. This is a standard Android behavior. Only the device manufacturer knows the limits of its implementation and can develop workarounds to force starting the app from scratch from its own launcher. This is not something I can do.

As for displaying a tuner card, I totally understand and agree, but unfortunately, I don't have any Android Tv device equiped with a tuner. This is something I would need in order to develop what you're requesting. I've taken the last 2 hours looking at how it should work theoretically, but theory is not enough and that's not something I can't do remotely. Of course, if I can support tv tuner in the future, I'll do it. A few people I know have an Android Tv, I might try on their Tv if I have the chance.

githottub commented 7 months ago

I rebooted the TV then followed your directions and can confirm that when launching the Live TV app through Projectivy it always goes to the last used input. If that was Live TV (i.e. the internal tuner) it will go back to that. But, if it was HDMI 1, it will go to HDMI 1. If the last used input was HDMI 2, the launching the Live TV app through Projectivy takes me to HDMI 2. Etc. I tried this several different ways, always exiting back to Projectivy using the home button not the back, and the result was always the same. So, it's not random but always launching the Live TV app through Projectivy goes back to the last input. And, like I mentioned previously, unlike the default input menu that includes Live TV, Projectivy does not include it as an input and therefore that's not a potential workaround.

spocky commented 6 months ago

Ok so this confirms what I wrote before, live tv is used to show tuner as well as external inputs. Due to how Android works, when you come back to a previously launched app, it will restore its state, in this case the displayed "channel". The only fix for your issue seems to be supporting tv tuner directly from the Inputs category. This will be done in the future.

githottub commented 6 months ago

Thank you for the update. If I can be of further help resolving this issue, let me know.