A mobile application for scanning, recognizing, and counting inventory objects using AI (Google ML Kit) and a REST API backend.
Inventory Scanner is an Android application developed as a diploma project at Ust-Kamenogorsk Higher Polytechnic College (2022). The application is designed for employees of organizations (warehouses, schools, enterprises) who need to conduct asset inventory efficiently.
Instead of manually typing inventory numbers, users can photograph or scan an item's inventory tag β the AI automatically recognizes the number and searches it against a remote database, then generates an inventory report.
| Feature | Description |
|---|---|
| π« Room Selection | Choose a classroom or department from the server database |
| π Smart Search | Live search by inventory number within a room or across the global database |
| π· AI Scanner | Recognize inventory numbers from a photo (camera or gallery) |
| β Object Marking | Mark found items as checked during the inventory session |
| π Report Generation | Generate and save an inventory report to device storage |
| π REST API Sync | All data is synced with a remote MariaDB server via HTTP |
The application uses a 2-tier client-server architecture:
ββββββββββββββββββββββ HTTP (REST API) βββββββββββββββββββββββ
β Android Client β βββββββββββββββββββββββββββΊ β Remote Server β
β (Kotlin + ML Kit) β βββββββββββββββββββββββββββ β MariaDB + PHP API β
ββββββββββββββββββββββ βββββββββββββββββββββββ
- Client: Android app (Kotlin, XML layouts)
- Server: Hosted on Gohost.kz, database managed via phpMyAdmin
- Communication: REST API using HTTP methods (GET, POST, PUT, DELETE)
- AI: Google ML Kit (on-device text recognition, no cloud dependency for basic scanning)
Classrooms Categories Items
ββββββββββββββ ββββββββββββββ ββββββββββββββββββββββββββ
num (PK) id (PK) inventory_num (PK)
name name name
category_id (FK β Categories)
class_room_num (FK β Classrooms)
created_at
updated_at
SplashScreen
β (permission check + internet check)
βΌ
MainActivity (Home)
β BottomNav: [π Home] [π Search]
βββ HomeFragment β classroom list from server
β β
β βΌ
β SearchFragment β items list for selected room
β βββ π Live search (room β global DB)
β βββ π· Scanner β ScannerActivity
β βββ π Report β CartListActivity
β
βββ ScannerActivity β camera / gallery + crop + ML Kit OCR
| Layer | Technology |
|---|---|
| Language | Kotlin (primary), Java, XML |
| IDE | Android Studio |
| AI / ML | Google ML Kit β Text Recognition |
| Networking | REST API over HTTP/HTTPS |
| Database | MariaDB (remote), phpMyAdmin |
| Architecture | 2-Tier Client-Server, MVVM (ViewModel) |
| Min SDK | Android 8.0 (API Level 26) |
| Parameter | Minimum |
|---|---|
| Android version | 8.0 (Oreo) or higher β API Level 26 |
| RAM | 1.5 GB or more |
| Free storage | 800 MB or more |
| Screen resolution | 1080 Γ 1920 px (FHD) |
| CPU frequency | 1.6 GHz or higher |
| CPU cores | 2 or more |
| Internet | Required (for DB sync and ML Kit cloud fallback) |
CAMERAβ for scanning inventory tagsREAD_EXTERNAL_STORAGE/WRITE_EXTERNAL_STORAGEβ for gallery access and report savingINTERNETβ for REST API communication
app/
βββ manifests/
β βββ AndroidManifest.xml # App config, permissions, components
βββ java/
β βββ MainActivity.kt # Main entry screen
β βββ SplashScreen.kt # Splash + permission check
β βββ ScannerActivity.kt # Camera/gallery scan + ML Kit OCR
β βββ CartListActivity.kt # Report screen (marked items)
β βββ HomeFragment.kt # Classroom list fragment
β βββ SearchFragment.kt # Item search + scan trigger
β βββ ConnectionDetector.kt # Internet connectivity check
β βββ HomeViewModel.kt # ViewModel for HomeFragment
β βββ ScanViewModel.kt # ViewModel for ScannerActivity
β βββ SearchViewModel.kt # ViewModel for SearchFragment
β βββ adapters/ # RecyclerView adapters
β βββ data/ # REST API (Retrofit/HTTP) calls
β βββ domain/ # Data models (Classroom, Item, Category)
β βββ interfaces/ # Click listeners, UI interfaces
β βββ utils/ # Constants and utility functions
βββ res/
βββ layout/ # XML screens (6 screens + templates)
βββ drawable/ # Icons, vector graphics
βββ font/ # 4 custom fonts
βββ mipmap/ # App launcher icons
βββ values/ # Colors, themes, strings
βββ xml/ # Backup rules, file paths
git clone https://github.com/deavers/InvScan.git
cd InvScanOpen the project folder in Android Studio (Flamingo or newer recommended).
In utils/Constants.kt (or equivalent), set your server base URL:
const val BASE_URL = "https://your-server.com/api/"Import the SQL schema into your MariaDB server using phpMyAdmin:
CREATE TABLE classrooms (num VARCHAR(20) PRIMARY KEY, name VARCHAR(100));
CREATE TABLE categories (id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(100));
CREATE TABLE items (
inventory_num VARCHAR(50) PRIMARY KEY,
name VARCHAR(200),
category_id INT,
class_room_num VARCHAR(20),
created_at DATETIME,
updated_at DATETIME,
FOREIGN KEY (category_id) REFERENCES categories(id),
FOREIGN KEY (class_room_num) REFERENCES classrooms(num)
);# Via Android Studio: Run βΆ or
./gradlew assembleDebug- User takes a photo or selects from gallery
- The image is cropped to the region of interest
- Google ML Kit processes the image on-device:
- If confidence β₯ 70% β result accepted
- If confidence < 70% β fallback to Google Cloud ML Kit
- If still < 70% β closest match is used
- Recognized number is searched in the room DB, then the global DB
- Result is displayed with item info and category
Average recognition time: ~1 second (varies by device and image quality)
Generated reports are saved to device storage as files named:
[RoomName]_[YYYY-MM-DD].xlsx / .txt
Report contents:
- Room full name
- Total items in room
- Number of marked (checked) items
- All inventory numbers with β / β status per item
| Method | Endpoint | Description |
|---|---|---|
| GET | /classrooms |
Get all classrooms |
| GET | /items?room={num} |
Get items for a specific room |
| GET | /items/{inventory_num} |
Search item globally |
| POST | /items |
Add new item |
| PUT | /items/{inventory_num} |
Move item to another room |
| DELETE | /items/{inventory_num} |
Remove item |
Sairakhan Shynggys
Diploma Project β Ust-Kamenogorsk Higher Polytechnic College
Specialty: Computer Engineering and Software
Group: 18-VT-2 | Year: 2022
This app requires a running backend server to function.
| Repository | Description |
|---|---|
| BaseInvScan | Laravel REST API backend β provides inventory items, classrooms and categories |
To run the full project, clone and start BaseInvScan first, then update BASE_URL in the app's constants file before building.
This project was developed as an educational diploma project.