Production-minded Android client (Java 17) for Student Management — Retrofit/OkHttp, JWT (access + rotating refresh), secure token storage via EncryptedSharedPreferences, Material design, and responsive layouts.
I keep detailed, evolving documentation on the development branch while keeping
mainclean and stable.• 👉 Full README: Android README (development)
• Browse branch: development branch
• Screens gallery:
docs/SCREENSHOTS.md(development)
- Secure auth: short-lived access token + rotating refresh token (resilient refresh with OkHttp
Authenticator) - Safe storage: tokens in EncryptedSharedPreferences with legacy-migration & defensive clears
- Clean networking: Retrofit 2.9, OkHttp 4.12 BOM, Gson converter, single
RetrofitInstance - Role-aware UI: Admin / Teacher / Student entry points via
EntryActivity(role + userType) - Responsive layouts: base layouts + dynamic sizing, with a few size-qualified overrides
- Polish: loading overlays, error styling, custom spinners, multi-select dialogs
-
Open the project in Android Studio (JDK 17).
-
Point to your backend: edit
network/RetrofitInstance.java→BASE_URL- Emulator:
http://10.0.2.2:8080/ - Device on same Wi-Fi:
http://<your-laptop-LAN-IP>:8080/
- Emulator:
-
Run the
appconfiguration on an emulator or device.
Cleartext (
usesCleartextTraffic="true") is enabled for dev. For production, switch to HTTPS and remove cleartext.
- Auth flow:
AuthInterceptoraddsAuthorization: Bearer <access>; on 401,TokenAuthenticatorcalls/auth/refresh, rotates tokens, and retries once. On failure, a single session-expired event is emitted and the user is routed to Login. - Storage:
TokenStore(EncryptedSharedPreferences) keeps{ accessToken, refreshToken, subjectId, role, userType }.
Full details, diagrams, and edge cases are documented on the development README (link above).
I develop on development and merge to main for stable releases.
git switch development
git switch -c feature/some-change
git push -u origin feature/some-change # PR: feature → development → main
This project is licensed under the MIT License — see the LICENSE file for details.