
How I Built a 100% Offline, AI-Powered Finance Tracker That Respects Your Privacy
Picture this: You’re standing at your local coffee shop, tapping your e-wallet to buy a Rp 25.000 iced latte. Within seconds, a notification banner pops up on your Android phone: "Payment successful to Janji Jiwa."
You swipe it away. Later that night, you open a budgeting app, ready to log the expense, but you hesitate. What category was that? Did I spend Rp 25.000 or Rp 30.000 with tip? By week three of the month, manual expense tracking feels like a second job, and you abandon the app entirely.
Sound familiar? You’re not alone. In Indonesia, despite smartphone adoption hovering near 90%, financial literacy remains below 50%. Most people want to manage their money better, but traditional budgeting apps demand endless manual input, lock basic charts behind recurring cloud subscriptions, or worst of all, harvest your personal transaction history to sell to advertisers.
I wanted to fix this. I wanted an app that automatically tracked every e-wallet payment and bank notification the instant it happened, rendered crisp interactive charts, gave actionable AI financial coaching, and did it all completely offline without sending a single raw transaction to the cloud.
That’s how Wang was born.

The Core Challenge, Automation vs. Absolute Privacy
When you look at modern automated finance apps, they usually rely on one of two methods: open banking APIs or server-side bank scraping. Neither works well for privacy-conscious users in Southeast Asia. Open banking integration is fragmented across local e-wallets like GoPay, OVO, and Dana, while server-side scraping means handing your bank credentials to a cloud company.
I set a hard boundary for Wang: Zero cloud dependency for core tracking. No account creation, no server database, no third-party analytics SDKs, and no background tracking trackers.
"Your financial life belongs on your device. Period. An app shouldn't need your email address just to calculate how much you spent on coffee this week."
This self-imposed restriction created a fascinating design puzzle:
- How do you automate transaction capture without cloud bank integrations?
- How do you run complex statistical analysis and anomaly detection on mid-range smartphones without freezing the UI?
- How do you integrate modern AI insights while maintaining absolute privacy over user data?
Intercepting the Notification Shade
The break came when I realized every major financial app in Indonesia—from BCA Mobile and Mandiri to ShopeePay and GoPay—sends a immediate, descriptive push notification the millisecond a transaction occurs.
Instead of fighting bank APIs or forcing users into manual logging, Wang uses Android’s native NotificationListenerService to capture transaction texts right as they arrive on your device.

Here’s how the magic happens under the hood:
- The Interception: When a notification arrives from a whitelisted app package (like
com.gojek.apporid.co.bca.bcamobile), Wang’s local service inspects the notification text on-device. - Regex Parsing: A set of lightweight, per-app regex parsers extracts the core details: transaction amount, merchant name, wallet source, and type (expense, top-up, or transfer).
- Encrypted Persistence: The extracted structure is immediately written to a local SQLite database encrypted with 256-bit AES encryption via SQLCipher.
If you don't want to grant notification access? No problem. Wang degrades gracefully, offering a fast manual transaction entry dialog with custom wallet management.
Designing an Experience That Feels Natural and Alive
Security and privacy don't have to look like boring enterprise software from 2012. I designed Wang using Jetpack Compose and Material Design 3, adopting an organic olive-and-teal color palette (#556423) paired with playful typography and a custom hand-drawn graffiti wordmark.
Visualizing Data with Vico
To give users instant clarity on their financial velocity, I integrated Vico, a modern Compose-native charting engine. Instead of clunky legacy charts wrapped in Android ViewFrames, Vico allowed me to build smooth, fluid donut breakdown graphs and dynamic bar charts that respond directly to state updates powered by Kotlin Flow.

The Floating Budget Overlay
Sometimes you need a quick sanity check before making an impulse purchase. Wang features an optional system floating bubble (TYPE_APPLICATION_OVERLAY). Tapping the draggable bubble opens a compact card showing your exact remaining daily budget and today’s total spend without needing to launch the main app.
Meet Fin, The Privacy-Preserving AI Advisor
To elevate Wang from a simple ledger into an active financial partner, I created Fin, an AI financial advisor powered by Google’s gemini-3.6-flash.
Here was the privacy dilemma, how do you feed personal financial context to an LLM without leaking private data?
My solution was an aggregated statistical pipeline:
Wang never sends raw transaction records, merchant names, or personal identifiers to Gemini. Instead, an on-device engine compiles numerical statistics (e.g., "Food category is at 82% of monthly budget with 12 days remaining"). Only this anonymous statistical summary is passed to the Gemini API.
Fin turns raw metrics into witty, conversational advice: "You’ve spent 40% of your weekly food allowance by Tuesday. Maybe cook dinner tonight?" No corporate speak, no robotic disclaimers—just real talk from a smart friend.

Behind-The-Scenes Engineering Struggles
Building an ambitious, offline-first Android application comes with its fair share of platform quirks. Here are a few honest lessons from the build process:
1. The MIUI & HyperOS Background Battle
Indonesia’s smartphone market is dominated by Xiaomi, Redmi, and POCO devices running MIUI/HyperOS. Xiaomi’s battery optimization is notorious for aggressively killing background services, wiping out notification listeners in the process.
Because Android provides no public API to check for custom OEM restrictions, I built a specialized MIUI Permission Recovery Flow. The app detects Xiaomi hardware and provides interactive deep links directly into MIUI’s hidden AutoStartManagementActivity and battery power-saver configurations, guiding users step-by-step to keep automated capture alive.
2. Machine Learning on $150 Phones
To detect unusual spending habits—like an accidental double-charge or a unusually large bill—I implemented an on-device Isolation Forest anomaly detection algorithm written purely in Kotlin.
Running ML algorithms on mid-range devices with 3GB RAM required extreme caution. The Isolation Forest model is trained locally in the background via WorkManager only when the user’s transaction history exceeds 20 entries per category, ensuring low-end devices never experience frame drops while scrolling through transaction lists.
3. Bulletproof Encryption
To keep financial data safe even if a phone is lost or rooted, the database relies on SQLCipher for AES-256 database-level encryption, paired with Google Tink and the Android Keystore for key management. DataStore Protocol Buffers handle user preferences, ensuring that even configuration states stay hardware-encrypted.
The Tech Stack & Creative Tools
Every layer of Wang was chosen to deliver performance, security, and a fluid user experience:
- Language & Platform: Kotlin 2.4, target SDK 37 (Android 16 compatibility), built with modern toolchains.
- UI Framework: Jetpack Compose with Material Design 3.
- Architecture: Clean Architecture + MVVM, powered by Koin 4.2 for lightweight dependency injection.
- Data & Security: Room with SQLCipher (AES-256), Google Tink, Android Keystore, and Proto DataStore.
- Asynchronous Flow: Kotlin Coroutines & Reactive Flow streams.
- Visuals & Charts: Vico Charting library for Compose.
- AI & ML: On-device Kotlin Statistical Engine + Firebase AI (Gemini 3.6 Flash for Fin).
- Internationalization: Lyricist for type-safe dual-language support (Bahasa Indonesia & English).
What’s Next?
Building Wang proved that you don't need to sacrifice privacy to build smart, modern, automated apps. By shifting processing back to the device, taking advantage of native platform APIs, and using modern Kotlin frameworks, personal finance tools can be fast, secure, and genuinely delightful to use.
Wang is a testament to what solo developers can achieve when prioritizing the end-user's trust over data monetization. Happy building!