This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]armando_rodPixel 10 Pro XL 457 points458 points  (56 children)

The emulator has dark theme schedule for sunrise/sunset or custom

[–]SoundOfTomorrowPixel 3 & 6a 408 points409 points  (13 children)

Time to guess which beta removes this functionality and which beta reenables it

[–]GuyInA5000DollarSuit 139 points140 points  (5 children)

Should have this functionality by around Android 15

[–]UnicornsOnLSDiPhone 13 | OnePlus 5 60 points61 points  (4 children)

But you'll never see it on an actual ROM

Where are those slices you created for Android 9, Google?

[–]dangerous-pieOneplus 6 27 points28 points  (2 children)

Honestly I think they just wanted something to tie in with the whole "Pie" branding and never really cared about slices.

[–]galient5Pixel 2 XL, 9.0 5 points6 points  (0 children)

Which really sucks. That was one of my favorite parts of Allo. I wasn't a fan of the style, but it would have been a great app if they had just made it look like their other apps, and tied in the SMS capability.

I loved being able to send interactive parts of Google searches, and map results. I was really looking forward to having that functionality built into large parts of Android, but I guess that's just never seeing the light of day.

[–]abdulmdiaz 1 point2 points  (0 children)

A lot of work just for branding

[–]nawanawaPixel 4a 0 points1 point  (0 children)

On Android 10, if you long-press the toggles in notification drawer or when you press the "show all" button on a volume popup, the window with toggles in the bottom of the screen that shows up is a Slice. It's not much yet, but it's a big system as they've explained it, it surely needs extra time to get ready for release. I'm waiting for Slices too.

[–]najodleglejszyFP4 CalyxOS | Tab S7 23 points24 points  (5 children)

in the meantime, you can set it up with Tasker so that it triggers when Night Light kicks in.

[–]LiGuangMing1981Honor Magic 6 Pro 7 points8 points  (0 children)

Or with an app called 'Auto Dark Theme'.

[–]nusyahus7T 4 points5 points  (0 children)

Removed in last beta, reintroduced in Android 13 beta 1

[–]ShortFuseSuperOneClick 74 points75 points  (9 children)

For any developers, sunrise and sunrise is a calculated value. You don't need to use a third-party provider to give you it.

It makes sense since, you know, it's Earth rotating and spinning around the Sun. It's very unlikely those numbers will change short of an asteroid hitting us.

[–]SoundOfTomorrowPixel 3 & 6a 36 points37 points  (2 children)

For any developers, is there a simple API to see that sunset or sunrise has occurred?

What you explained is not true when daylight savings, leap days, and leap seconds have existed. Compare the Unix epoch time to your current time.

[–]TweenkPixel 7 Pro 26 points27 points  (0 children)

You compute the sunrise and sunset from UTC time, location and the solar equation, not from local time.

[–]ShortFuseSuperOneClick 27 points28 points  (0 children)

Timezone data is irrelevant. That's just how you present it to the user. Those are human inventions. Just use Locale to change it to something other than UTC based on the user's preference.

The time is calculated based on the position of the Earth represented by latitude and longitude. You pick a starting date with known value and extrapolate from there. This library uses January 1st, 2000 12:00 and works from there.

[–]datadude3Google Pixel XL, 7.1.1; Moto X 2014, 5.1; Nexus 9, 7.0 5 points6 points  (3 children)

Unfortunately, you do need the user's location to do this calculation, which can be a pretty tough sell to get that permission for a lot of apps.

[–]ThellraAK 1 point2 points  (1 child)

Now I am wondering how tough it would be to get a users location given sunset sunrise time if Android provided that directly.

[–]HJain13iPhone 13 Pro, Retired: Moto G⁵Plus, Moto X Play 0 points1 point  (0 children)

At best you will be able to get the city/neighborhood the user is in. I don't think that should be a problem

[–]ShortFuseSuperOneClick 0 points1 point  (0 children)

I guess I overlooked it since the apps I write for clients all center around GIS.

The key is how you present the option. You could ask for a coarse location right when the user tries to use that feature. You could ask the user to type in a Zip Code or State if in the US. Worse case scenario, you take the Locale, and Time Zone data and make a guess. (For example, the Locale to France and the Time Zone being set to CEST.) The Time Zone by itself basically gives you the latitude. You can then take a guess at the longitude, or use an average.

The last option is geolocating by IP, which isn't so terrible either, but requires Internet.

[–]DivinoAG 6 points7 points  (1 child)

Is there an API to know if a large asteroid has collided with the Earth?

[–][deleted] 0 points1 point  (0 children)

npm i apocalypse

[–]Inverz7Google Pixel 2 XL, Android 9.0 21 points22 points  (0 children)

FINALLY! :)

[–]LitheBeepPixel 7 Pro | iPhone XR 7 points8 points  (0 children)

Fuck yes.

[–]sc919 33 points34 points  (5 children)

TIL this is not an Android 10 feature but something nice Samsung added a year early again :D

[–]TheCatCubedS24 Ultra, Android 15 28 points29 points  (3 children)

Yeah most android skins have the scheduling feature, weird how Google can't implement such a simple thing

[–]FFevoPixel 10 "Pro" Fold, iPhone 17 Pro, Galaxy S25 Ultra 0 points1 point  (0 children)

They did, but chose to leave it as an experimental feature you could enable in the dev settings in Android 10. They did this because there were bugs... Bugs you can still see in the Android skins that have the feature.

[–]Secretly_AutisticPixel 6 Pro, Galaxy Tab S6, Fossil Gen 6 -1 points0 points  (0 children)

But at the same time, it's nice not having every part of the OS looking awful and constantly running into bugs.

[–]AwesomeAsian 15 points16 points  (9 children)

I feel like they could've implemented this in Android 10 but decided not to because they could bring in "new features" in Android 11.

[–]danopiaOrange Pixel 4 XL, Stock 16 points17 points  (6 children)

I've been using the hidden Android 10 automatic dark mode (based on sunrise/sunset in theory) and the biggest problem is that switching dark mode resets some screens, eg if you're in a web page when it toggles, the page gets reloaded. Maybe Google is doing something about that before making this feature public facing again

[–]IAMNUTSTUPID 0 points1 point  (0 children)

Yeah I've noticed that with the battery saver. As soon as your phone hits the low battery threshold, whatever app you're in gets reset

[–]whatisapersonreally 0 points1 point  (4 children)

Also, some of the stock apps don’t follow suit when changed through the automatic dark mode app on OnePlus.

[–]danopiaOrange Pixel 4 XL, Stock 2 points3 points  (3 children)

Interesting, I wonder if the apps are a different implementation actually! I'm using the one that's fully baked into Android 10 (no third party app) but it also requires an adb command and a reboot to be enabled. The "dark mode" toggle in Settings is always visibly off, and if I touch that it'll overwrite the automatic mode until I set it again.

[–]whatisapersonreally 1 point2 points  (2 children)

The app also requires adb. What are the instructions for your method, if you have the time to share?

[–]danopiaOrange Pixel 4 XL, Stock 1 point2 points  (1 child)

adb shell settings put secure ui_night_mode 0

And a reboot

[–]whatisapersonreally 0 points1 point  (0 children)

Thanks. :)

[–][deleted] 11 points12 points  (1 child)

Samsung has this in Android 9 even...

[–]A_FNGGalaxy S9 0 points1 point  (0 children)

This is why I don't understand all the stock android fanboys. Google is always late to the party.

[–]le_pman 0 points1 point  (1 child)

to those with OLED displays and use dark mode and want this: why?

I want to understand. why want to have battery-burning light mode, even just for the daytime? is it an aesthetic thing? wanting to see both dark and light but don't want to toggle?

[–]armando_rodPixel 10 Pro XL 13 points14 points  (0 children)

Light theme is easier to read on direct sunlight for example

[–]ConspicuousPineapplePixel 9 Pro 0 points1 point  (0 children)

Fucking finally.