This is the foundation of a native Android audiobook player that connects to your Sappho server. Here's what's already implemented:
- Android Project Structure - Modern Gradle setup with Kotlin DSL
- Dependency Injection - Hilt configured and ready
- Network Layer - Retrofit API client with JWT authentication
- Secure Storage - EncryptedSharedPreferences for tokens
- UI Framework - Jetpack Compose with Material 3
- Theme - Blue-tinted dark theme matching Sappho web app
- Authentication - Complete login flow with server URL config
- Home Screen - Continue Listening and Recently Added sections
- Jetpack Compose & Material 3
- Hilt (Dependency Injection)
- Retrofit (API calls)
- Room (Database - ready to use)
- Media3/ExoPlayer (Audio playback - ready to use)
- Coil (Image loading)
- WorkManager (Background tasks - ready to use)
- Install Android Studio: Download from https://developer.android.com/studio
- Open Project: File → Open → Select the
sapphoappdirectory - Sync Gradle: Android Studio will automatically sync dependencies
- Wait for indexing: Let Android Studio index the project
- Create an Android Virtual Device (AVD) in Android Studio
- Tools → Device Manager → Create Device
- Select a device (e.g., Pixel 6)
- Select API 34 (Android 14) system image
- Click the Run button (green play icon) or press Shift+F10
- Select your emulator from the list
- Enable Developer Options on your Android device:
- Go to Settings → About Phone
- Tap "Build Number" 7 times
- Enable USB Debugging:
- Settings → System → Developer Options
- Turn on "USB Debugging"
- Connect device via USB
- Click Run and select your device
When you launch the app for the first time:
-
Server URL: Enter your Sappho server address
- Example:
http://192.168.1.100:3002 - Must be accessible from your device/emulator
- Use
http://10.0.2.2:3002if Sappho is on localhost (emulator only)
- Example:
-
Login: Use your existing Sappho credentials
- Username and password from your Sappho server
- Token is stored securely in EncryptedSharedPreferences
-
Browse: View your audiobook library!
To continue building the app, you'll want to implement:
- Full audiobook grid
- Search functionality
- Filters and sorting
- Navigation to detail screen
- Playback controls
- Seek bar
- Chapter navigation
- Speed control
- MediaSessionService implementation
- Notification with controls
- Lock screen integration
- Download manager
- Local storage with Room
- Sync progress when online
build.gradle.kts- Project dependenciesapp/build.gradle.kts- App module dependenciesAndroidManifest.xml- App permissions and components
SapphoApplication.kt- Application entry pointMainActivity.kt- Main activity with Compose setupSapphoApp.kt- Navigation and routingpresentation/login/- Login screen and logicpresentation/home/- Home screen and logicpresentation/theme/- Material 3 themedata/remote/SapphoApi.kt- API endpointsdata/repository/AuthRepository.kt- Authenticationdomain/model/- Data modelsdi/NetworkModule.kt- Dependency injection config
- Ensure Sappho server is running
- Check firewall settings
- For emulator: use
10.0.2.2instead oflocalhost - For physical device: ensure device and server are on same network
- Check internet connection
- File → Invalidate Caches / Restart
- Delete
.gradlefolder and re-sync
- Ensure JDK 17 is configured
- Tools → SDK Manager → Install Android SDK 34
- Update Android Studio to latest version
This is in active development! Priority areas:
- Library screen implementation
- Audio playback service
- Player UI
- Offline downloads
- Android Auto support
Happy coding! 🎧