Let me start with the honest part, because it's the whole point of this post.
I am not an Android developer. Before this I had never written a line of Kotlin. I didn't know what Jetpack Compose was, or what a widget actually is under the hood. What I had was an idea and a problem: I was smoking about 20 cigarettes a day and I wanted to stop.
I built it for myself. It's on GitHub (Free) now in case it helps someone else: if it helps even one person, that's mission success for me.
Why counting worked when nothing else did
I tried the usual things. Willpower. "I'll stop after this pack." None of it stuck, because I genuinely had no idea how much I was smoking. It was just... a thing my hands did (not sure if I am addicted to the nicotine, the action of mere smoking, or the warmth of the smoke in my mouth, etc..). Research papers are filled with non-correlative or non-convincing conclusions.
The app Pace does one thing: count. One tap, one cigarette. And then it showed me the number I had never actually looked at before.
Seeing "14" at 4pm hits differently than a vague feeling of "I smoke a bit much."
Then I added the second half, which turned out to be the important one: how much time is left until the next one. Not a rule, not a punishment: just a countdown. Tuns out, for me countdown provided the patience and will power to hold on for another 30 minutes. And something about waiting for a timer instead of reaching for a pocket changed the whole thing for me.
The widget that appears on the homescreen is the part that actually changed my habit
This is the bit I want to say properly.
Our phones have become body parts. We look at them every few minutes without deciding to. So I put the counter and the countdown on my home screen as a widget.
Now I don't have to remember to open an app during a craving. I unlock my phone for something completely unrelated and the reminder is just there. "3 today. 22 minutes to go."
It's constant, but it doesn't nag. And honestly, seeing that little card a hundred times a day is the reason my confidence has changed. For the first time I actually believe I will be able to quit.
Finding: Five minutes of distraction gets you past it
Here's the other thing I learned about myself: a craving is not permanent. It's about five minutes long. If I can get through those five minutes, I am fine.
So Pace sends me a notification when a craving is likely, and it opens straight into a chat. Ollama LLM model (with a personality) then tries to distract. Not a lecture, just something to talk about, or a riddle, or one silly specific thing to do for two minutes. The distraction eats the five minutes, and then it passes, and then it's ok.
That's the entire trick. It sounds too simple to work. It worked for me. Sharing it here not for views or stars or collaboration or anything. Even if it helps 1 person, I am happy, thats the purpose of this post.
So how did someone who can't code build an Android app?
I used AI. Specifically Claude Code completely to build the app and improve it.
I want to be clear about the split of work, because I think people oversell this:
What I did: described what I wanted in plain English. Used the app every single day on my own phone. Found the things that felt wrong and said so "the countdown on the widget is frozen", "I tapped it by accident in my pocket and it logged a cigarette I never smoked", "this animation feels sluggish". Made pretty much every decision about how it should behave.
What the AI did: all of the actual Kotlin. The database, the Compose screens, the widget, the notifications, the tests.
What I'm honest about: I do not fully understand every file in that repository. I can read it and follow it, but I couldn't have written it. If a real Android developer looks at the code and finds things to criticise, they're probably right, and I would like to hear it.
The parts I did go through carefully are the ones about my own data: where things get stored, what leaves the phone. (Answer: everything stays on the device. There's no server, no account, no analytics. The AI chat is optional and uses your own API key.)
Where I am now
From ~20 a day to 5ā6 a day. Some days 4.
I haven't quit yet. Iam not going to pretend I have. But I'm not where I was, and for the first time it feels like a matter of when rather than if.
If you are in the same boat, the code is here: github.com/ravipurohit1991/pace. It's free, there's nothing to sign up for, and I'm not selling anything.
And if you have got an idea for something small that would make your own life a bit better: I think this is genuinely the moment to try building it. Not knowing how to code used to be the end of the conversation. It isn't anymore.
Good luck. Genuinely.
Top comments (1)
It reminds me of Ricky Gervais's books on 'how to stop' and what it does, is actually encourage you throughout reading it to drink/smoke, essentially exactly what your app did, it told you incrementally 'time to smoke' and you keep telling yourself "I'm trying to quit", so when the book says drink/smoke, you choose not to. Keep reading and again... Again... Until the desire to drink/smoke is all but gone. Because you are training yourself to not smoke when told to and ignore your habit. Smart, I imagine alot of people would find it quite helpful