- Add 3-second delay before first API call after authentication - Prevents hitting 429 rate limit on immediate profile fetch - Existing retry backoff logic remains for subsequent attempts Related to Spotify API rate limiting after login flow. |
||
|---|---|---|
| .github | ||
| android | ||
| assets/images | ||
| ios | ||
| lib | ||
| screenshots | ||
| scripts | ||
| .fvmrc | ||
| .gitattributes | ||
| .gitignore | ||
| .metadata | ||
| analysis_options.yaml | ||
| build-apk.js | ||
| BUILD_README.md | ||
| devtools_options.yaml | ||
| LICENSE | ||
| list-commands.js | ||
| nightly-apk.js | ||
| nightly-github-release.js | ||
| nightly-release.js | ||
| nightly.js | ||
| package-lock.json | ||
| package.json | ||
| pubspec.lock | ||
| pubspec.yaml | ||
| README.md | ||
| release-apk.js | ||
| test-release-notes.js | ||
| WIDGET_CLICKABLE_IMPROVEMENTS.md | ||
| WIDGET_SETUP.md | ||
Playtivity - Spotify Friends Activity App
A Flutter app that shows your friends' Spotify activities in real-time. Built with Flutter and the Spotify Web API.
Features
- 🔐 Secure Login: OAuth authentication through embedded WebView
- 🎵 Real Friend Activities: Automatically extracts
sp_dccookie during login for friend activity access - 📱 Profile Dashboard: View currently playing, top tracks, and top artists
- 🌙 Dark Mode: Toggle between light and dark themes
- 🎨 Spotify Design: Authentic Spotify branding and colors
Screenshots
Login Screen |
Home Screen |
Profile - Top Artists |
Profile - Top Songs |
Settings Screen |
How It Works
Friend Activities
The app uses an innovative approach to show friend activities without requiring your own Spotify API credentials:
- Direct Web Authentication: Uses Spotify's web login flow directly without requiring API registration
- Automatic Cookie Extraction: During the login process, the app automatically extracts the
sp_dccookie from the WebView - Internal API Access: Uses the extracted cookie to generate access tokens for Spotify's internal buddy list API
- Real-time Data: Accesses the same endpoints used by Spotify's web player for friend activities
Technical Implementation
- TOTP Generation: Implements the same TOTP algorithm used by Spotify's internal systems
- Token Generation: Automatically generates access tokens using the
sp_dccookie and TOTP - API Integration: Calls the same endpoints used by Spotify's web player for friend activities
Setup
-
Clone the repository:
git clone <repository-url> cd playtivity -
Install dependencies:
flutter pub get -
Run the app:
flutter run
🛠️ Development Scripts
The scripts/ folder contains utility scripts for development:
Icon & Image Generator
Automatically generates all required app icons and images from a single source image:
# Install Python dependencies
cd scripts
pip install -r requirements.txt
# Generate icons from your image (run from project root)
python scripts/convert_icon.py your_logo.svg
python scripts/convert_icon.py your_logo.png
What it creates:
- 📱 Android Icons: All mipmap densities (mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi)
- 🖼️ Flutter Images: Login screen logos, button icons, display images
- 🎨 Multiple Sizes: 24x24 to 200x200 pixels for different use cases
See scripts/README.md for detailed usage instructions.
Dependencies
provider- State managementhttp- API requestsshared_preferences- Local storagewebview_flutter- Embedded OAuth logincached_network_image- Image cachingtimeago- Time formattingfont_awesome_flutter- Spotify iconscrypto- HMAC-SHA1 for TOTP generation
Architecture
- Providers: State management for authentication and Spotify data
- Services: API integration for Spotify Web API and buddy list
- Models: Data structures for User, Track, and Activity
- Screens: Login, Home (activities), Profile, and Settings
- Widgets: Reusable components for activities and tracks
Current Status
✅ OAuth authentication with automatic cookie extraction
✅ Real friend activities via unofficial API
✅ Profile data (currently playing, top tracks/artists)
✅ Dark mode toggle
🧪 Testing Status
- Android: ✅ Fully tested on Android 15
- iOS: ❌ Not tested - community contributions welcome!
Note
: This app has only been tested on Android 15. While it's built with Flutter and should theoretically work on iOS, no testing has been performed on iOS devices. iOS users may encounter platform-specific issues. We welcome iOS testers and contributors!
🗺️ Roadmap
Future improvements planned:
- [✅] Complete API-free implementation - Remove all dependencies on Spotify API client/secret
- iOS testing and support - Test and fix iOS-specific issues
- Home screen widgets - Android widgets showing friend activity and currently playing
Want to contribute? Check out our Contributing Guidelines below!
🤝 Contributing
We welcome contributions from the community! Here's how you can help:
🐛 Bug Reports
- Found a bug? Please open an issue with:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Device/OS information
🚀 Pull Requests
- Pull requests are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Test thoroughly
- Commit with clear messages
- Push to your branch
- Open a pull request with detailed description
🍴 Forks
- Forks are encouraged! Feel free to:
- Fork this project for your own use
- Customize it for your needs
- Share your improvements back with the community
- Create your own variations
💡 Feature Requests
- Have an idea? Open an issue with the
enhancementlabel - Describe your use case and proposed solution
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
TL;DR: You can do whatever you want with this code - use it, modify it, distribute it, even commercially. Just keep the copyright notice.
Third-Party Notices
- Spotify is a trademark of Spotify AB
- This project is not affiliated with or endorsed by Spotify
- Built for educational and personal use
Made with ❤️ for music lovers