This is a campus fee query Android application that can check meal card balance, water fee balance, and electricity fee balance.
- Email verification login (@wku.edu.cn)
- Dormitory information binding
- Meal card balance query
- Water fee balance query
- Electricity fee balance query
- Query history records
- Developer mode (custom API parameters)
- Local data storage for privacy protection
- UI Framework: Jetpack Compose
- Architecture Pattern: MVVM + Repository
- Network Requests: Retrofit + OkHttp
- Data Storage: DataStore Preferences
- Asynchronous Processing: Kotlin Coroutines + Flow
- Dependency Injection: Manual dependency injection
app/src/main/java/com/wku/cardquery/
├── data/ # Data layer
│ ├── models/ # Data models
│ ├── Config.kt # Configuration management
│ └── RoomDataManager.kt # Room data management
├── network/ # Network layer
│ ├── ApiService.kt # API interface definitions
│ └── NetworkClient.kt # Network client
├── repository/ # Repository layer
│ ├── AuthRepository.kt # Authentication repository
│ └── QueryRepository.kt # Query repository
├── viewmodel/ # ViewModel layer
│ ├── AuthViewModel.kt # Authentication ViewModel
│ └── MainViewModel.kt # Main ViewModel
├── ui/ # UI layer
│ ├── screen/ # Screens
│ │ ├── LoginScreen.kt # Login screen
│ │ └── MainScreen.kt # Main screen
│ └── theme/ # Theme
└── MainActivity.kt # Main Activity
- Android Studio Flamingo or higher
- Android SDK API 24+ (Android 7.0)
- Kotlin 1.9.20+
- Gradle 8.2+
The app includes default API configuration parameters and can be run directly upon first use. For custom configuration, modify settings in the app's developer mode.
Room information is stored in the assets/rooms_data.json
file, containing building, floor, and room information for the school.
- Login verification server:
https://wkuquery.asia:5000/
- Meal card query interface:
https://webapp.xiaofubao.com/
- Water and electricity fee query interface:
https://application.xiaofubao.com/
- Registration and Login: Register and verify using @wku.edu.cn email
- Bind Dormitory: Select building, floor, and room number
- Start Querying: Click the query button to get real-time data
- View History: Check historical query records
- Configure Settings: Customize API parameters in developer mode
- All data stored locally, not uploaded to third-party servers
- Sensitive configuration information saved only on local device
- Network requests only access official query interfaces
To customize API parameters, follow these steps:
- Download and configure network packet capture tool (such as Fiddler Everywhere)
- Perform a query operation on the official query page
- Get the
shiroJID
value from the request header Cookie - Get the corresponding ID and area code from request parameters
- Add network request methods in the corresponding Repository
- Add business logic in ViewModel
- Add corresponding UI components in the UI layer
This project follows the MIT License. See LICENSE file for details.
Issues and Pull Requests are welcome to help improve this project.
- v1.0.0: Initial version with basic functionality implemented