With Android 15, you may be able to create an even more personalized bedtime routine

TL; DR

  • Third-party apps now have access to the same functionality as Digital Wellbeing's bedtime mode in Android 15.
  • Bedtime Mode is a feature that mutes your phone and changes various screen options to help you sleep better at night.
  • Before Android 15, certain screen options could only be controlled by Google's Digital Wellbeing app.

It's very tempting to use your phone late at night before going to bed, but it can be detrimental to your sleep schedule and quality. Hence Google's Digital wellbeing app has a special bedtime mode that you can reverse. Bedtime mode mutes your phone and changes several screen options to encourage you to stop using your phone. Currently, only the standard, pre-installed Digital Wellbeing app has the ability to automatically change distracting screen options, meaning you're limited to using the app's time-based trigger. But in the near future Android 15 Update gives Google third-party apps the ability to change distracting screen options, giving developers the opportunity to let users create an even more customized bedtime mode routine.

If you open the Digital Wellbeing settings page and tap Bedtime mode, you can change when the routine is activated. You can set it on a fixed schedule or have it turn on when charging after a specific time. Once you choose when you want it to activate, you can customize what happens when Bedtime mode is enabled. You can choose to have Bedtime mode activate Android's Do Not Disturb mode, so that only alarms and calls from important contacts reach you. You can also choose to have Bedtime Mode change various screen options, such as changing the grayscale of your screen, turning on dark mode, turning off the always-on screen, and dimming the background.

If you choose to have Bedtime mode activate Android's Do Not Disturb mode, the system will create a corresponding schedule for Do Not Disturb mode, called “Bedtime Mode.” This can be seen below Settings > Notifications > Do Not Disturb > Schedules. Android has long allowed third-party apps to create their own schedules for Do Not Disturb mode via the AutomaticZenRule API, as long as they are appropriately named “Do Not Disturb Access” (internally known as ACCESS_NOTIFICATION_POLICY) below Settings > Apps > Special app access.

However, the operating system does not allow third-party apps to change the various screen options that Google's Digital Wellbeing app enables during Bedtime mode. This is because the APIs used by Digital Wellbeing to enable grayscale, disable AOD, dim the background and enable dark mode are not normally accessible by third-party apps. Several developers have already come up with ways to change these screen options in their apps, but their methods require installation and use ADB to manually grant some hidden permissions. Fortunately, app developers won't have to use these workarounds in Android 15, as the operating system finally offers a public API for third-party apps to control the same screen options controlled by Google's Digital Wellbeing app.

With the release of Android 15 developer preview 2Google has introduced a new one ZenDeviceEffects API that allows apps to dim the background, minimize screen color saturation (i.e. go to grayscale), mute ambient display, and toggle night mode (i.e. dark theme) when the app-created schedule for the Do not disturb mode comes into effect. The developer of Tasker, one of the best automation apps for androidhas added support for these APIs to their app, allowing it to set a custom schedule for Do Not Disturb mode that also changes these screen options.

The benefit of Google making this API public is that users won't be limited to using the company's Digital Wellbeing app to manage these screen options at night. For example, users could create an even more customized Bedtime Mode routine via a third-party app, one that might be triggered based on scanning an NFC tag instead of, say, the time. There may be other uses of this API that app developers should discover and take advantage of.

Since Google publicly released the ZenDeviceEffects API in the Developer Preview 2 blog post, it's unlikely to be dropped before the stable release of Android 15 later this year. However, there's a decent chance it could tweak the API before the stable release, as several features, like changing dark mode, don't work right now, despite what the documentation says. Moreover, we hope that the company will open the additional information ZenDeviceEffects which supports Android 15, including the ability to disable adaptive brightness, disable tap to wake, disable tilt to wake, disable touch interactions, minimize radio usage, and maximize sleep mode. However, these additional effects are currently hidden from the public Android 15 SDK, so there's a chance they'll never be made public.

Do you have a tip? Talk to us! Email our staff at [email protected]. You can remain anonymous or get credit for the information, it's your choice.

You may like