1. Data Scanning System
•
Technology: Uses CameraX for camera management and Google ML Kit for barcode scanning.
•
ScanActivity: The main screen that opens the camera to receive barcode data in "Raw Data" format.
2. Core Feature: Data Filter Bridge
This is the most special part of your app, with DataFilterBridge processing:
•
Parsing: When scanning very long barcodes (e.g., barcodes combining product name, code, and quantity), the app will automatically "split" the raw data into three parts:
i.
Product Name
ii.
Barcode
iii.
Quantity
•
Settings: Users can customize the start and length of parsing (Start & Length).
3. Smart Validation (Feature PRO)
The app includes a system to prevent human error, which you are currently developing. FilterSettingsFragment:
•
Smart Conditions: Rules can be set for how scanned data is allowed to be saved, such as:
◦
Maximum character length.
◦
Must start with a specified prefix.
◦
Must be all numbers or must contain uppercase letters.
•
Real-time Preview: On the settings page, a test field allows you to enter test data to see if the set rules are working correctly (color highlighting indicates which part is the name and which part is the code).
4. Data Management
•
Database: Uses Room Database (SQLite) to store product data and scan history on the device.
•
UI Components: Uses Fragments and Navigation Components to switch between screens (e.g., Home -> Scan -> Settings).
5. In-App Monetization
•
BillingManager: Uses Google Play Billing Library v7.
•
Business Model: The app is "Freemium," meaning basic usage is free, but more complex "Smart Filter" features or unlimited verification rules are available for purchase. Users must pay to unlock (In-app Purchase - One-time purchase).
Summary of Workflow:
1.
User opens the app -> Goes to the main screen to view the stock list.
2.
Press scan -> Camera activates -> Barcode is obtained.
3.
Bridge activates -> Extracts data according to settings (e.g., extracts characters 1-5 as names, 6-15 as barcodes).
4.
Smart Filter checks -> If the data violates rules (e.g., too short), the app will display a warning and prevent saving.
5.
Save -> Data is entered into the Room database -> Stock screen is updated.
This project is considered an advanced stock management app that focuses on customization according to the barcode format of each business user.