AI-Powered Emotion-Aware Smart Diary
An Android diary app that analyzes entries with an on-device TensorFlow Lite model and connects photos, locations, and emotions through Firebase and Google Maps
Project Overview
This project is an Android smart diary app that automatically analyzes the emotion expressed in a journal entry and records it together with a photo and the location where it was written. Korean entries are translated into English through the Papago API and then classified by a TensorFlow Lite text model embedded in the app. Saved entries can be revisited through a date-ordered list and detail view, while their locations are visualized on Google Maps using emotion-coded markers.
The app was developed by a two-person team as a 2025 term project for Pusan National University’s Software Design and Laboratory course. It integrates Android UI development and external app interactions with on-device AI inference, a network API, location services, and cloud data storage in one mobile workflow.
Core Features
- Diary writing and drafts: Captures a title, place, and body text, with Firestore-backed draft storage for continuing an unfinished entry later.
- Photo attachment: Launches the Android camera app or system photo picker and previews the selected image in the editor.
- AI emotion analysis: Translates Korean text into English and classifies it with an in-app MobileBERT-based TensorFlow Lite model.
- Location capture: Uses the Fused Location Provider to store the device’s latitude and longitude with each entry.
- Entry browsing: Loads Firestore entries in reverse chronological order into a RecyclerView and opens a detail view containing the photo, text, place, and emotion.
- Map visualization: Creates emotion-colored markers for saved locations and opens the corresponding entry when a marker’s information window is selected.
Emotion Analysis and Persistence Flow
Korean diary entry → Papago Translation API → English text → MobileBERT TFLite inference → Emotion level
Photo upload → Firebase Storage URL → Firestore document with text, emotion, location, and date
The classifier loads mobilebert.tflite from the app’s assets and performs inference on a dedicated executor. The returned negative score is mapped to five levels: positive, somewhat positive, neutral, somewhat negative, and negative. Model inference, network requests, and database operations are kept off the UI thread through coroutines and asynchronous callbacks so that the interface remains responsive throughout the save pipeline.
Each Firestore document stores the entry ID, date, emotion, image URL, latitude and longitude, place, title, and body. The image is uploaded to Firebase Storage first, and its generated URL is then attached to the diary document.
App Screens
My Contributions
Based on the final presentation’s division of responsibilities, I worked on the following areas:
- Designed the UI and XML layouts for the home, editor, list, and detail screens
- Connected the diary list and detail view with ViewBinding and a custom RecyclerView adapter
- Implemented camera capture and gallery selection through the Activity Result APIs
- Managed the Firestore save/load workflow and Firebase Storage image integration
- Passed data between activities with intents and represented emotion results through colors and UI states
Results and Takeaways
The completed app implements the full asynchronous pipeline from writing an entry to translation, on-device emotion inference, image upload, and persistent storage. Saved entries are available in a chronological list and detail view, while entries with location data appear on Google Maps with emotion-specific marker colors. Camera, gallery, and location permission flows were also integrated in a real Android environment.
The project provided hands-on experience with Activity- and RecyclerView-based Android UI architecture, ViewBinding, runtime permissions, and the Activity Result APIs. It also showed how to transform an AI model’s output into application data and visual feedback while coordinating network, storage, and database operations without blocking the user interface.
Tech Stack
Android Studio · Kotlin · Android SDK · ViewBinding · RecyclerView · Kotlin Coroutines · TensorFlow Lite · MobileBERT · Papago API · Google Maps SDK · Fused Location Provider · Firebase Firestore · Firebase Storage · Retrofit · Glide