A powerful Android app for tracking basketball shots using voice commands. Practice smarter with real-time stats, advanced analytics, and beautiful visualizations.
- Hands-free operation via Bluetooth headphones
- Expanded voice commands:
- Say "hit", "make", "made", "good", or "in" to record a make
- Say "miss", "missed", "no good", or "brick" to record a miss
- Say "undo", "cancel", or "take back" to undo last shot
- Specify shot types: "three pointer hit", "free throw miss", etc.
- Background operation - runs without interrupting your music
- Haptic feedback - feel confirmation vibrations on each shot
- Voice feedback (optional) - hear "Hit" or "Miss" confirmations
Track different shot types separately:
- General shots
- 3-Pointers
- Mid-Range shots
- Layups
- Free Throws
View detailed statistics for each shot type!
- Real-time shooting percentage with circular progress indicator
- Current streak tracking - see your hot/cold streaks with visual indicators
- Time-based stats: Today, Week, Month, Year
- Beautiful bar charts showing percentage trends over time
- Session tracking - organize practice sessions with notes
- Shot history - complete log of all shots with swipe-to-delete
- Set custom daily shot goals
- Track progress toward percentage targets
- Visual progress indicators
- Configurable targets in settings
- Undo functionality - made a mistake? Undo the last shot
- Manual entry buttons - quick tap entry when voice isn't available
- CSV export - share your data with coaches or analyze in spreadsheets
- Settings screen - customize feedback, sessions, and goals
- Auto-session start - automatically create practice sessions
- Persistent notification with live stats and quick actions
- Foreground service keeps tracking active in background
- Room database for reliable local data storage
- Material Design 3 UI with smooth animations
- Clean, intuitive interface optimized for one-handed use
- Circular progress indicators
- Interactive charts with MPAndroidChart
- Beautiful orange/blue color scheme
- Android 8.0 (API 26) or higher
- Microphone permission for voice tracking
- Bluetooth (optional, for headphones)
- Google Speech Recognition
- Allow microphone access when prompted
- Allow Bluetooth and notification permissions (if applicable)
- Tap the settings icon to customize:
- Enable/disable haptic feedback
- Enable/disable voice feedback
- Set daily shot goals
- Configure auto-session start
- Select your shot type (General, 3PT, Mid-Range, Layup, Free Throw)
- Tap "Start Voice Tracking"
- Connect your Bluetooth headphones (optional)
- Start shooting!
Voice Commands:
- "hit" / "make" / "made" / "good" / "in" β Record a make
- "miss" / "missed" / "no good" / "brick" β Record a miss
- "three hit" or "three pointer make" β 3PT make
- "free throw miss" β Free throw miss
- "undo" / "cancel" / "take back" β Undo last shot
Manual Entry:
- Tap β Hit or β Miss buttons for quick entry
- Use βΆ Undo button to remove last shot
- Switch between Today/Week/Month/Year views
- Check your current streak
- View shooting percentage over time in charts
- Tap History icon to see all shots
- Tap Export CSV to share your data
- MVVM Pattern with ViewModels and LiveData
- Repository Pattern for data access
- Room Database with 3 entities (Shots, Sessions, Goals)
- Kotlin Coroutines for async operations
- Foreground Service for continuous voice tracking
Data Layer:
Shot,Session,GoalentitiesShotDao,SessionDao,GoalDaofor database accessShotRepositorywith comprehensive statistics methodsPreferencesfor user settings
Service Layer:
ShotTrackingService- Foreground service with:- Continuous speech recognition
- Text-to-speech feedback
- Haptic vibration support
- Intelligent error recovery with exponential backoff
- Session management integration
UI Layer:
MainActivity- Main dashboard with stats, charts, and controlsShotHistoryActivity- Scrollable shot log with swipe-to-deleteSettingsActivity- Customizable preferencesMainViewModel- Business logic and state management
- Uses Android SpeechRecognizer API
- Continuous listening mode with automatic restart
- Multi-result processing for better accuracy
- Context-aware shot type detection
- Music-friendly (doesn't pause playback)
- Robust error handling
- Shot percentage by time period
- Streak tracking (current hot/cold streak)
- Daily/weekly/monthly/yearly aggregations
- Shot type breakdowns
- Goal progress tracking
- Session statistics
- Clone the repository
git clone https://github.com/DerMoha/HoopTracker.git
cd HoopTracker-
Open in Android Studio
- Android Studio Hedgehog or newer recommended
- Kotlin 1.9.20+
- Gradle 8.2.0+
-
Sync Gradle and build
./gradlew build- Run on device or emulator
./gradlew installDebugThe app requires:
RECORD_AUDIO: For voice recognitionBLUETOOTH/BLUETOOTH_CONNECT: For Bluetooth headphone supportVIBRATE: For haptic feedbackFOREGROUND_SERVICE: To keep tracking active in backgroundPOST_NOTIFICATIONS: For persistent tracking notificationWRITE/READ_EXTERNAL_STORAGE: For CSV export (API < 29)
- 100% local - all data stored on your device
- No internet required - works completely offline
- No data collection - we don't track or collect anything
- No analytics - your shooting stats stay private
- Open source - inspect the code yourself
See your current hot streak (consecutive makes) or cold streak (consecutive misses) with visual indicators. Motivates you to keep the streak alive!
- Compare performance across different shot types
- Track improvement over time with trend charts
- Export data to CSV for deeper analysis
- Session-based organization for structured practice
- Undo button right in the notification
- One-tap manual entry
- Quick shot type switching
- Fast access to history and settings
- Auto-start sessions when tracking begins
- Add notes to practice sessions
- Review session statistics
- Historical session tracking
- Shot charts with court visualization
- Multiple user profiles
- Advanced drills and challenges
- Social features (share achievements)
- Integration with fitness apps
- Dark mode
- Home screen widget
- Wear OS companion app
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- MPAndroidChart for beautiful chart visualizations
- Material Design 3 for modern UI components
- Android Jetpack for robust architecture components
Made with β€οΈ for basketball enthusiasts. Keep shooting, keep improving! π