You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every night before bed, I plug my phone into the charger. It automatically sets dark mode. It's a feature in vanilla Pixel 8. For some reason, if the active app is Grayjay - the video I'm currently watching stops, and the app shows me a video I watched a few hours ago. I cannot say for sure what makes that video the selected one, but it's usually some video I watched a while ago.
My device is a Pixel 8, running the latest Android 15, but it also happened when I had Android 14.
I'll say that Grayjay isn't the only app with this issue: HomeAssistant restarts on toggle, Brave opens a new tab, YouTube pauses the video. But out of all of these, Grayjay is the most disruptive. Because to back to my video I have to open "history", click my video and then click "skip to XYZ".
Steps to reproduce:
Open Grayjay
From the home tab, select a video.
3a. Pull up your quick settings, choose dark mode
3b. Plug your phone into the charger at night with dark mode enabled in preferences
A different video will start playing.
Grayjay Version
264
What plugins are you seeing the problem on?
All
Plugin Version
No response
When do you experience the issue?
While logged in
While logged out
N/A
Relevant log output
Version information (version_name = 264-13-g2bcd59c, version_code = 1, flavor = unstable, build_type = debug)
Device information (brand= google, manufacturer = Google, device = shiba, version-sdk = 35, version-os = )
(e, ExceptionActivity, 2024-10-26 11:28:27): Uncaught exception ("Unknown Context"): Already running.
java.lang.Exception: Already running.
at com.futo.platformplayer.mdns.ServiceDiscoverer.start(ServiceDiscoverer.kt:40)
at com.futo.platformplayer.states.StateSync.start(StateSync.kt:72)
at com.futo.platformplayer.states.StateApp.mainAppStarting(StateApp.kt:416)
at com.futo.platformplayer.activities.MainActivity.onCreate(MainActivity.kt:253)
at android.app.Activity.performCreate(Activity.java:9002)
at android.app.Activity.performCreate(Activity.java:8980)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1526)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4030)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4235)
at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:6304)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:6195)
at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:79)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:60)
at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:174)
at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:109)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:81)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2636)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8705)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
The text was updated successfully, but these errors were encountered:
I found the cause for this, and managed to fix it. Since Futo is not accepting contributions to the core, I'll just outline the problem, and explain how to solve it.
When the app’s theme changes, either through the system setting or AppCompat, it triggers a uiMode configuration change. This means activities are automatically recreated.
This creates an issue for Grayjay, because MainActivity.kt instantiates a lot of things. In this specific case, it tries to create another instance of MainApp, which tries to create another instance of StateSync, which crashes in case of double instantiation.
There are multiple ways to fix this issue. But the easiest by far would be to follow the recommendations given by the Android docs themselves:
An app can handle the implementation of dark theme by declaring that each Activity can handle the uiMode configuration change:
What happened?
Every night before bed, I plug my phone into the charger. It automatically sets dark mode. It's a feature in vanilla Pixel 8. For some reason, if the active app is Grayjay - the video I'm currently watching stops, and the app shows me a video I watched a few hours ago. I cannot say for sure what makes that video the selected one, but it's usually some video I watched a while ago.
My device is a Pixel 8, running the latest Android 15, but it also happened when I had Android 14.
I'll say that Grayjay isn't the only app with this issue: HomeAssistant restarts on toggle, Brave opens a new tab, YouTube pauses the video. But out of all of these, Grayjay is the most disruptive. Because to back to my video I have to open "history", click my video and then click "skip to XYZ".
Steps to reproduce:
3a. Pull up your quick settings, choose dark mode
3b. Plug your phone into the charger at night with dark mode enabled in preferences
Grayjay Version
264
What plugins are you seeing the problem on?
All
Plugin Version
No response
When do you experience the issue?
Relevant log output
The text was updated successfully, but these errors were encountered: