AA Day/night mode change

Post Reply
k.s.deviate
Posts: 39
Joined: Mon Nov 24, 2025 7:32 pm

AA Day/night mode change

Post by k.s.deviate »

Is it possible to have Hudiy forced to dark mode while having it not affect android autos automatic day/night mode?

I would like Hudiy to be in dark mode all the time while AA is able to change itself between day and night automatically.
hudiy
Site Admin
Posts: 440
Joined: Mon Jul 14, 2025 7:42 pm

Re: AA Day/night mode change

Post by hudiy »

Day/Night mode in Android Auto is currently synced with the Dark mode in Hudiy. To our knowledge, the 'phone-controlled' option was previously available in Android Auto developer settings but has been removed. Currently, you can manually set the Day/Night mode directly in the Android Auto settings. There are three options:

-Day
-Night
-Automatic (controlled by the vehicle)

Can you describe exactly what you are trying to accomplish? We'll try to suggest a solution then.
k.s.deviate
Posts: 39
Joined: Mon Nov 24, 2025 7:32 pm

Re: AA Day/night mode change

Post by k.s.deviate »

hudiy wrote: Tue Dec 16, 2025 7:02 pm Day/Night mode in Android Auto is currently synced with the Dark mode in Hudiy.
This is exactly what I'm seeing, when Hudiy is on dark mode and AA is set to automatic, Google maps is in dark mode as well. The opposite is true when Hudiy is not in dark mode.

What I want is for Hudiy to be in dark mode, while AA is truly automatic with its modes - dark mode at night and day mode during the day.

The more I think about this, it's probably something that has to be done through AA. As when it's set to automatic, the theme is determined by the headunit isn't it?
hudiy
Site Admin
Posts: 440
Joined: Mon Jul 14, 2025 7:42 pm

Re: AA Day/night mode change

Post by hudiy »

k.s.deviate wrote: Tue Dec 16, 2025 10:22 pm The more I think about this, it's probably something that has to be done through AA. As when it's set to automatic, the theme is determined by the headunit isn't it?
Based on our observations with reference phones (mostly Pixels), they are unable to switch between Day/Night modes on their own. If the Day/Night indicator is not sent from the "head unit", they will remain in Day mode. Therefore, it appears that 'Automatic' mode is controlled entirely by the head unit.

You could consider using the API to control Android Auto's Day/Night mode independently. The API exposes the projection status and allows you to control Dark Mode status. When the projection status becomes active, you can apply the desired mode (e.g., based on GPIO or the system clock). When projection is inactive (phone disconnected or switching from Android Auto to the Native UI), you can set Dark Mode to true. Here is a simple example based on:

https://github.com/wiboma/hudiy/blob/ma ... arkMode.py
https://github.com/wiboma/hudiy/blob/ma ... nStatus.py

Code: Select all

#
#  Copyright (C) Hudiy Project - All Rights Reserved
#

import common.Api_pb2 as hudiy_api
from common.Client import Client, ClientEventHandler


class EventHandler(ClientEventHandler):

    def on_hello_response(self, client, message):
        print(
            "received hello response, result: {}, app version: {}.{}, api version: {}.{}"
            .format(message.result, message.app_version.major,
                    message.app_version.minor, message.api_version.major,
                    message.api_version.minor))

        set_status_subscriptions = hudiy_api.SetStatusSubscriptions()
        set_status_subscriptions.subscriptions.append(
            hudiy_api.SetStatusSubscriptions.Subscription.PROJECTION)
        client.send(hudiy_api.MESSAGE_SET_STATUS_SUBSCRIPTIONS, 0,
                    set_status_subscriptions.SerializeToString())

    def set_dark_mode(self, client, dark_mode_enabled):
        set_dark_mode = hudiy_api.SetDarkMode()
        set_dark_mode.enabled = dark_mode_enabled
        client.send(hudiy_api.MESSAGE_SET_DARK_MODE, 0,
                    set_dark_mode.SerializeToString())

    def on_projection_status(self, client, message):
        print("projection status, active: {}".format(message.active))

        if message.active:
            # Set day/night for Android Auto based on your desired input (GPIO, clock, etc.)
            self.set_dark_mode(client, False)
        else:
            self.set_dark_mode(client, True)


def main():
    client = Client("dark mode example")
    event_handler = EventHandler()
    client.set_event_handler(event_handler)
    client.connect('127.0.0.1', 44405)

    active = True
    while active:
        try:
            active = client.wait_for_message()
        except KeyboardInterrupt:
            break

    client.disconnect()


if __name__ == "__main__":
    main()
We will implement independent Android Auto Day/Night mode control in the next version, as it seems like a useful feature. Thanks for the idea.
Post Reply