My Codex usage cap has reset, so it's time for another big porting project. This time, replacing my crummy old Android version of Lights Off with a version that matches the modern iOS app 1:1.

Whenever it goes astray, I tell it to look back at the iOS code and make things look / layout exactly like that

And with an evening of prompting, I have got a complete port of the modern version of Lights Off on Android, in Java/XML, complete with responsive layout, themes, settings, animation, sound and more, using the latest iOS codebase as a reference. It matches the version on iPhone and iPad almost down to the last pixel. I haven't touched a line of code manually (except for the original Swift code), and Codex 5.3 did all the work. It completely replaces the old Android version I wrote a decade ago
It is really hard to design a beautiful modern Android app, because no two apps on the system look the same, and there are no good references from Google, at all. And if a human won't have a clue, an LLM certainly won't know what to do either. The freaking Clock and Recorder apps are the best examples I can draw from
Codex is trying its hardest, though
OK, I've done my research, I've pointed it at the APIs and styles I want, and I've painstakingly guided it through the process, so this is my best attempt at a Material Design 'settings' view for Lights Off on Android
And here are the screens in picture form. I used the recommended MDL3 Expressive styles from the design docs, I checked as many system apps as I could for reference, it uses the inherited system theme colors as appropriate, and on foldables it expands out into a navigation rail view
I don't think I have anything more to add to this project. It's a complete one-to-one recreation of the entire iOS version of Lights Off, every feature and corner of the app intact, with native Material Design 3 Expressive UI, and full support for phones, foldables and tablets. It is absolutely leagues better than the previous version of Lights Off I wrote for Android back in the early 2010s, and I haven't touched a line of code myself. I need to redo the app icon by hand, but it's ready to ship
Since I have so much extra time to work with, I inserted a new dynamic theme that inherits the user's Material You system theme colors, drawn from the user's wallpaper

You may have a different opinion, but I believe I have put together a beautiful version of Lights Off for Android. I started it late last night, picked it back up at 9am this morning, and I've started submitting builds to Google Play's internal testing mechanics at 1pm.

(I have burned through 19% of my Codex weekly limit on the $20 plan)

Since people are fascinated by the behind-the-scenes, here's the starting prompt.

I wish I had taken screenshots of the first run, because it didn't look anything like what I have now. But through iteration, perseverance, getting it to refer to the iOS source code over and over again, and doing quite a bit of design research of my own, I got exactly what I wanted, and much more

Some more Material You colors from the dynamic theme. Just change the wallpaper on your Android device, and Lights Off automatically updates with the theme colors

It has been eleven years since the last build of Lights Off was submitted to Google Play.

It was culled in 2016, along with all my other Android apps, because it hadn't been updated to the latest SDKs

Since it's interesting to some, I have exported what seems to be my full set of Codex prompts to get Lights Off to Android in the finished state you see here, with the starting point of my iOS codebase. Only my side of the conversation, because the other side is information overkill for every reply and lots of references to source code and files (and I tend to not read the replies anyway). I only wish I had taken screenshots of every time I ran the app; maybe next time

https://gist.github.com/steventroughtonsmith/2b8d1c35d0e1d2fd8a59b956e3c3c1b4

Lights Off iOS -> Android

Lights Off iOS -> Android. GitHub Gist: instantly share code, notes, and snippets.

Gist

⭐️ Here's a closer look at Lights Off for Android, ported from the iOS Swift codebase to Android's Java, screen for screen, in full, by Codex 5.3. It uses the latest Material Design 3 patterns and styles, and it even has an adaptive 'dynamic' theme that inherits your system colors. It supports phone, foldable and tablet devices, with an expanded layout to match, and it runs all the way back to Android 5.0 (Lollipop)

Download: https://play.google.com/store/apps/details?id=com.steventroughtonsmith.lightsoff

(Scroll back up the thread for more detail)

@stroughtonsmith if more Android apps had this attention to detail I’d switch in a heartbeat
@notkoalas Codex did its part, I did my part. Neither were trivial