schorschii / FsClock-Android

Fullscreen Clock Screensaver for Android Smartphone, Tablet & TV
GNU General Public License v3.0
90 stars 38 forks source link

Landscape mode on charger/power plug #44

Closed joaocandre closed 6 months ago

joaocandre commented 6 months ago

Any plans to allow triggering landscape mode from charger plug? That's how I mostly use the app.

schorschii commented 6 months ago

Can you please describe your use case in more detail? Why should the app rotate to landscape when plugging in the charger?

joaocandre commented 6 months ago

I often use it as a table top clock, usually with the cable plugged. Obviously I can always open the app, but if both features are present, it streamlines the process.

schorschii commented 6 months ago

OK, so what you want is that it automatically opens when plugging in the charger. First I thought that you want it to rotate to landscape when plugging in the charger.

So the thing is that this is not possible anymore in recent Android versions. I already implemented this here, but it only works in old Android versions. https://github.com/schorschii/FsClock-Android/blob/32ef242b11bea6cb392580aee60bd0167c9f9d8f/app/src/main/AndroidManifest.xml#L59

But nearly the same thing can be achieved by setting the clock as screensaver. Then you can connect your device to power and wait a minute until the screensaver starts. Isn't this a solution for you?

joaocandre commented 6 months ago

But nearly the same thing can be achieved by setting the clock as screensaver. Then you can connect your device to power and wait a minute until the screensaver starts. Isn't this a solution for you?

After checking, that's precisely how I have it configured (was under the idea it was the app enforcing that transition), but the landscape view isn't available that way; it literally says so in the app settings i.e. Force landscape mode (only when starting manually).

schorschii commented 6 months ago

Yes, that's right, landscape isn't available then. This and the no longer working automatic app start via <action android:name="android.intent.action.ACTION_POWER_CONNECTED" /> are Android system restrictions. There is nothing I can do about it.