Ramesh Inampudi

Android

SMS Cleaner: Sort and Delete Android SMS by Category

By Ramesh Inampudi · 2026-03-02 · 4 min read

Most phone inboxes fill up with messages nobody needs to keep: one-time passwords that expired minutes after arriving, promotional blasts, delivery pings, and bank alerts. Scrolling through thousands of them to delete the junk while keeping the useful ones is tedious. SMS Cleaner is a small Android app I wrote in Kotlin to make that job faster. It groups messages into categories and lets you delete a whole batch at once.

Why I built it

The problem is not that any single message is hard to delete. It is that the inbox mixes everything together. An OTP from last month sits next to a bank statement alert, and both sit next to a food delivery promotion. The default messaging app treats them all as one chronological stream, so cleaning up means opening conversations one by one.

I wanted the opposite workflow: look at one kind of message at a time, decide quickly, and clear it. If I am looking at only OTPs, I can safely wipe all of them. If I am looking at Finance, I can slow down and pick carefully. Categorizing first makes bulk deletion much less risky.

What it does

The app reads the SMS messages on the device and presents them in tabs by category. The README lists Finance, OTP, Spam, Food and Travel, among others. The features are:

The select-all control matters more than it looks. Without it, clearing a tab of two hundred expired OTPs would mean two hundred taps. With it, the work is a tap to select everything, a quick scan, and one delete.

How it works

The project is a standard single-module Android app written in Kotlin. Everything lives in the app module and builds with Gradle, using Java 17. You can open it in Android Studio or build from the command line with ./gradlew assembleDebug and install it on a connected device with ./gradlew installDebug. The debug APK ends up at app/build/outputs/apk/debug/app-debug.apk.

The default SMS app requirement

The most important design constraint is not in my code but in the Android platform. Reading messages is one permission. Deleting them is different: Android only lets the device's default SMS app modify the SMS store. That restriction exists so that an arbitrary app cannot silently rewrite or erase your messages.

So SMS Cleaner has to become the default SMS app before it can delete anything. I did not want the app to take over that role permanently, because it is not a full messaging client and you would not want to lose your normal one. Instead, the app prompts you to set it as the default only when you actually try to delete, and the README describes this as a temporary change. Browsing and categorizing work without it; the role is asked for at the moment it is needed.

The reusable lesson is to request the heavy privilege at the point of use, and to explain why. A user who sees a prompt right after tapping Delete understands the connection. A user who sees it at first launch has no context and is more likely to refuse.

Refresh behaviour

Because the list reflects the device's message store, it can go stale: new messages arrive, or deletions happen elsewhere. Pull-to-refresh and the toolbar refresh button both exist so the view can be reloaded on demand. Offering two entry points is cheap and covers both touch habits, gesture users and people who look for a visible button.

What I learned

One practical caution: deleting messages cannot be undone from within the app, so review a selection before confirming, especially in categories like Finance where an old message might be something you need later.

Conclusion

SMS Cleaner is a small tool with one job: turn an unmanageable inbox into a few focused lists you can clear quickly. The code is Kotlin on a plain Gradle setup, and the interesting part is how it works with Android's default SMS app model instead of around it. The project is released under the MIT license. If you have questions or ideas about it, you can reach me at hello@iramesh.com.