πΈ ExpenseTracker
A fully-featured personal expense tracking app built as a native Android application using a WebView-based architecture. No sign-in required. All data stored locally on your device.
π± Screenshots

β¨ Features
π° Transactions
- Add income and expense transactions
- Set description, notes, category, date and time
- Attach receipt photos from gallery
- Mark transactions as recurring monthly β auto-added every month
- Edit or delete any transaction
- Search transactions by description or notes
- Filter by category chips
π Analytics
- Monthly income, expenses, net balance and average expense
- Navigate between months
- Spending breakdown by category (tap to see all transactions in that category)
- 6-month comparison bar chart
- 14-day daily spending chart
π‘ Budgeting
- Set an overall monthly budget with a live progress bar on the home screen
- Set per-category budgets with progress bars and alerts
- Budget rollover β carry unspent budget from last month to this month
- View, edit and delete all budgets in one screen
- Warnings when approaching or exceeding any budget
π·οΈ Categories
- 16 built-in categories (Food, Transport, Shopping, Bills, Health, Fun, Home, Education, Travel, Fitness, Savings, Salary, Freelance, Gift, Other, Coffee)
- Edit any default category β change name and emoji
- Hide categories you donβt use
- Create custom categories with any emoji from your keyboard
- Delete custom categories
π€ Data Transfer
- Export full backup (JSON) β includes all transactions, settings, budgets, categories and receipt photos
- Export as Excel β choose date range (this month / 3 months / 6 months / all time / custom), generates 3 sheets: Transactions, By Category, Monthly Summary
- Import from JSON backup β merges with existing data, restores photos
- Designed for switching phones without losing any data
π¨ Quality of Life
- Dark / Light theme toggle
- PIN lock β set a 4-digit PIN to protect the app
- Currency selector β supports any symbol ($ β¬ Β£ βΉ Β₯ etc.)
- Biggest expense of the month highlighted on home screen
- Pull-to-refresh prevention (no accidental reloads)
- Keyboard-aware popups (forms slide above keyboard)
- Add Expense widget β tap to instantly open the add transaction screen
- Recent Expenses widget β shows your 5 most recent expenses with emoji, description, amount and time, updates automatically
π οΈ Tech Stack
| Layer |
Technology |
| Android wrapper |
Kotlin + WebView |
| UI |
HTML, CSS, JavaScript (single file) |
| Storage |
localStorage (WebView) + SharedPreferences (widget) |
| Excel export |
SheetJS (xlsx.js) |
| Fonts |
Google Fonts (Syne + DM Mono) |
| Build |
Android Studio, Gradle 8.2 |
| Min SDK |
Android 7.0 (API 24) |
| Target SDK |
Android 14 (API 34) |
π Getting Started
Prerequisites
- Android Studio (latest stable)
- JDK 17 or 19 (not 21 β incompatible with Gradle 8.2)
- An Android phone running Android 7.0+
Build & Run
- Clone the repository:
git clone https://github.com/YOUR_USERNAME/ExpenseTracker.git
- Open the project in Android Studio:
- File β Open β select the
ExpenseTracker folder
-
Wait for Gradle to sync (first time may take a few minutes)
- Build the APK:
- Build β Build Bundle(s) / APK(s) β Build APK(s)
- APK will be at
app/build/outputs/apk/debug/app-debug.apk
- Install on your phone:
- Transfer the APK to your phone
- Enable Install unknown apps in your phone settings
- Tap the APK to install
π Project Structure
ExpenseTracker/
βββ app/src/main/
β βββ assets/
β β βββ index.html # Entire app UI (HTML/CSS/JS)
β βββ java/com/expensetracker/
β β βββ MainActivity.kt # WebView host + JS bridge
β β βββ ExpenseWidget.kt # Add Expense home screen widget
β β βββ RecentExpensesWidget.kt # Recent Expenses widget
β βββ res/
β β βββ layout/
β β β βββ activity_main.xml
β β β βββ widget_add_layout.xml
β β β βββ widget_recent_layout.xml
β β βββ xml/
β β β βββ widget_add_info.xml
β β β βββ widget_recent_info.xml
β β β βββ file_paths.xml
β β βββ drawable/
β β βββ widget_background.xml
β βββ AndroidManifest.xml
π Switching Phones
All your data (transactions, photos, budgets, settings) can be transferred between phones:
- On your old phone: Settings β Export Backup (JSON)
- Copy the
.json file to your new phone (WhatsApp, Google Drive, USB, etc.)
- On your new phone: Settings β Import Data β select the file
- Everything is restored including receipt photos
π Privacy
- No internet connection required after first load (fonts are cached)
- No account or sign-in of any kind
- No data leaves your device β everything is stored in local storage
- No ads, no tracking, no analytics
π Permissions
| Permission |
Reason |
INTERNET |
Load Google Fonts on first launch |
READ_EXTERNAL_STORAGE |
Import backup files |
WRITE_EXTERNAL_STORAGE |
Save exported files to Downloads (Android β€ 9) |
READ_MEDIA_IMAGES |
Pick receipt photos from gallery (Android 13+) |
π§βπ» Development Notes
JS β Android Bridge
The app communicates between JavaScript and Kotlin via @JavascriptInterface:
// Called from JS to save a file
fun exportData(data: String, filename: String, encoding: String)
// Called from JS to refresh the Recent Expenses widget
fun updateWidget(recentJson: String)
// Called from JS to trigger the file picker
fun triggerImport()
After installing the app:
- Long press your home screen
- Tap Widgets
- Find ExpenseTracker
- Youβll see two widgets β drag either one to your home screen
π License
This project is for personal use.
π€ Author
Created by β
M