r/Android • Dark Pink • Feb 19 '20

Android 11 Developer Preview | Android Developers

https://developer.android.com/preview/
1.8k Upvotes

310 comments sorted by

View all comments

459

u/armando_rod Pixel 10 Pro XL Feb 19 '20

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

409

u/SoundOfTomorrow Pixel 3 & 6a Feb 19 '20

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

144

u/GuyInA5000DollarSuit Feb 19 '20

Should have this functionality by around Android 15

61

u/UnicornsOnLSD iPhone 13 | OnePlus 5 Feb 19 '20

But you'll never see it on an actual ROM

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

27

u/dangerous-pie Oneplus 6 Feb 19 '20

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

6

u/galient5 Pixel 2 XL, 9.0 Feb 20 '20

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.

→ More replies (1)
→ More replies (1)

26

u/najodleglejszy FP4 CalyxOS | Tab S7 Feb 19 '20

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

7

u/LiGuangMing1981 Honor Magic 6 Pro Feb 19 '20

Or with an app called 'Auto Dark Theme'.

5

u/nusyahus 7T Feb 19 '20

Removed in last beta, reintroduced in Android 13 beta 1

76

u/ShortFuse SuperOneClick Feb 19 '20

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.

36

u/SoundOfTomorrow Pixel 3 & 6a Feb 19 '20

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.

28

u/Tweenk Pixel 7 Pro Feb 19 '20

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

30

u/ShortFuse SuperOneClick Feb 19 '20

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.

6

u/datadude3 Google Pixel XL, 7.1.1; Moto X 2014, 5.1; Nexus 9, 7.0 Feb 20 '20

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.

→ More replies (3)
→ More replies (2)

23

u/Inverz7 Google Pixel 2 XL, Android 9.0 Feb 19 '20

FINALLY! :)

7

u/LitheBeep Pixel 10 Feb 19 '20

Fuck yes.

36

u/sc919 Feb 19 '20

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

28

u/TheCatCubed S24 Ultra, Android 15 Feb 19 '20

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

→ More replies (1)
→ More replies (1)

16

u/AwesomeAsian Feb 19 '20

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.

15

u/danopia Orange Pixel 4 XL, Stock Feb 19 '20

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

→ More replies (6)
→ More replies (2)
→ More replies (13)