DEV Community

Cover image for How I Built a Customizable QR & Barcode Scanner in Android (Kotlin + KTS) — Free Demo + Source Code
NenteroDevs
NenteroDevs

Posted on

How I Built a Customizable QR & Barcode Scanner in Android (Kotlin + KTS) — Free Demo + Source Code

I’ve been working on ScanGO X, a fully customizable QR & Barcode scanner built in Android Studio (Kotlin + KTS).
What started as a personal experiment quickly grew into a complete tool with skins, themes, modular architecture, and a clean UI.

In this post, I want to share how I built it, what I learned, and how you can try the demo or get the full source code if you want to study it or use it in your own projects.
Why I Built ScanGO X

I wanted a scanner that wasn’t just functional, but visually customizable.
Most QR apps look identical, so I created a system where users can apply skins, change the frame style, and personalize the scanning experience.

At the same time, I wanted:

clean architecture

modular code

Kotlin DSL (KTS) Gradle setup

lightweight dependencies

fast scanning

offline privacy
Enter fullscreen mode Exit fullscreen mode

Project Structure (High‑Level Overview)

The app is divided into clear modules:
Código

app/ → Main module (UI, navigation, themes)
qr/ → QR & Barcode scanning + generation logic
skins/ → All skin assets + dynamic frame system
billing/ → One‑time premium unlock
ads/ → AdMob integration
data/ → History, favorites, local storage
ui/ → Components, icons, styles

This separation makes the project easier to maintain and extend.
Using Kotlin + KTS (Gradle Kotlin DSL)

The entire project uses KTS instead of Groovy.
This gives:

better autocompletion

fewer build errors

cleaner dependency management
Enter fullscreen mode Exit fullscreen mode

Example snippet:
kotlin

dependencies {
implementation(libs.zxing)
implementation(libs.androidx.camera.core)
implementation(libs.androidx.camera.view)
}

Customizable Skins System

One of the most fun parts of the project is the skin system.

Each skin is:

a vector frame

a themed decoration (flowers, gaming, food, science, pets, etc.)

a “SCAN ME” ribbon

a square slot that aligns perfectly with the QR preview
Enter fullscreen mode Exit fullscreen mode

Skins can be swapped instantly without breaking the QR detector.

This makes the app feel unique and visually appealing.
QR & Barcode Scanning Logic

The scanner uses:

CameraX for camera preview

ZXing for decoding

A custom overlay to highlight the scanning area
Enter fullscreen mode Exit fullscreen mode

The decoding runs on a background thread to keep the UI smooth.
Premium Unlock (One‑Time Purchase)

The app includes a simple one‑time purchase to unlock:

all skins

unlimited history

no ads
Enter fullscreen mode Exit fullscreen mode

Billing is handled through a small, clean Kotlin class:
kotlin

const val PREMIUM_PRODUCT_ID = "your_product_id"

AdMob Integration

Ads are optional and easy to configure.
Buyers only need to replace their IDs in:
Código

app/src/main/res/values/ads.xml

Free Demo + Full Source Code

If you want to try the app, here’s the free demo APK:

👉 https://nenterodevs.itch.io/scango-x-qr-and-barcode-reader

If you want the full source code (Kotlin + KTS), it’s available on the same page.
Community‑Driven Development

The future of this project depends on the community.
If you try the demo, leave feedback, or support the project, I’ll keep improving it and adding new skins, features, and optimizations.

Your ideas can shape the next updates.
Final Thoughts

This project taught me a lot about:

modular Android architecture

CameraX

QR decoding

UI/UX polish

Gradle KTS

selling code on itch.io
Enter fullscreen mode Exit fullscreen mode

If you want a breakdown of any specific part (CameraX, skins, billing, KTS setup), let me know and I’ll write a deeper article.

Thanks for reading — and thanks to everyone who supports indie devs.

Top comments (1)

Collapse
 
bhavin-allinonetools profile image
Bhavin Sheth

This is a really clean breakdown — I especially like how you approached modularization early instead of letting everything live in the app module.

The skins system is a nice touch too. Most scanner apps stop at “it works,” but the visual customization + offline focus makes this feel more like a product than a demo project.

Also appreciate the use of KTS — once you get used to it, going back to Groovy feels painful.

Curious which part ended up being the trickiest: CameraX integration, skin alignment with the preview, or billing?