A modern, feature-rich Android music streaming application built with Java, offering a comprehensive music discovery and playback experience with social features, admin management, and real-time chat support.
- Features
- Technology Stack
- Architecture
- Project Structure
- Prerequisites
- Installation
- Configuration
- Database Setup
- Build & Run
- API Integration
- Contributing
- License
- Music Streaming: Stream millions of songs with high-quality audio playback
- Smart Playback: Queue management, shuffle, repeat modes
- Now Playing: Full-featured player with lyrics support
- Browse & Discover: Explore songs by genre, artist, and album
- Search: Advanced search functionality across all content
- Library Management: Personal library with liked songs and custom playlists
- Playlist Creation: Create, edit, and share playlists
- Album & Artist Pages: Detailed views with discography
- Authentication: Email/password registration and login
- Google Sign-In: One-tap authentication with Google accounts
- User Profile: Customizable profiles with preferences
- Notifications: Real-time notifications for new releases and updates
- Settings: Comprehensive app settings and preferences
- Help Center: In-app support with chat functionality
- Real-time Chat: Direct messaging between users and admins
- Admin Chat Support: Dedicated support channel for user assistance
- User Chat: Peer-to-peer communication
- Notification System: Push notifications for new songs, albums, and shared content
- Song Management: Add, edit, and manage song catalog
- Album Management: Create and manage album collections
- User Support: Admin chat interface for customer support
- Dashboard: Administrative dashboard for content management
- Location Services: OpenStreetMap integration for location-based features
- Offline Mode: Download songs for offline listening (Premium)
- Equalizer: Built-in audio equalizer for sound customization
- Onboarding: Interactive user onboarding experience
- Platform: Android (API 26+)
- Language: Java 11
- Build System: Gradle
- Min SDK: 26 (Android 8.0)
- Target SDK: 36 (Android 14)
- Compile SDK: 36
- UI: Material Design Components, ConstraintLayout
- Architecture: MVVM (Model-View-ViewModel)
- Database:
- Room Database (local caching)
- SQL Server (remote database via JDBC)
- Networking:
- Retrofit 2 (REST API)
- OkHttp (HTTP client with logging)
- Gson (JSON serialization)
- Authentication: Google Sign-In (Play Services Auth)
- Maps: OSMDroid (OpenStreetMap integration)
- Image Loading: Glide
- Email: JavaMail API (SMTP)
- UI Components:
- Vertical SeekBar
- CircleImageView
- Navigation Component
- SwipeRefreshLayout
The application follows the MVVM (Model-View-ViewModel) architecture pattern:
- Model: Data models and repositories for data access
- View: Activities, Fragments, and XML layouts
- ViewModel: Business logic and state management
- Repository Pattern: Abstraction layer for data sources
- Activities: UI controllers for different screens
- Fragments: Reusable UI components
- Adapters: RecyclerView adapters for lists
- Services: Background services for music playback and notifications
- Managers: Utility classes for authentication, playback queue, etc.
- Repositories: Data access layer abstraction
- Utils: Helper classes for database, network, and other utilities
app/
├── src/main/
│ ├── java/com/example/brainify/
│ │ ├── activities/ # Activity classes
│ │ ├── adapters/ # RecyclerView adapters
│ │ ├── config/ # Configuration classes
│ │ ├── fragments/ # Fragment classes
│ │ ├── managers/ # Manager classes
│ │ ├── models/ # Data models
│ │ ├── notifications/ # Notification components
│ │ ├── repositories/ # Repository implementations
│ │ ├── services/ # Background services
│ │ ├── utils/ # Utility classes
│ │ └── MainActivity.java # Main activity
│ ├── res/
│ │ ├── layout/ # XML layouts
│ │ ├── drawable/ # Icons and images
│ │ ├── values/ # Strings, colors, styles
│ │ ├── xml/ # XML configurations
│ │ └── mipmap/ # App icons
│ └── AndroidManifest.xml
├── build.gradle # App dependencies
├── proguard-rules.pro # ProGuard rules
└── libs/ # Local JAR libraries
└── jtds-1.3.1.jar # jTDS SQL Server driver
database/
├── docker-compose.yml # Docker setup for SQL Server
├── main.sql # Main database schema
└── prod.sql # Production database schema
build.gradle # Root build configuration
gradle.properties # Gradle properties
settings.gradle # Project settings
Before you begin, ensure you have the following installed:
- Android Studio: Arctic Fox or later (recommended: latest stable version)
- JDK: Version 11 or higher
- Android SDK:
- API Level 26 (Android 8.0) minimum
- API Level 36 (Android 14) target
- Git: For version control
- Docker (optional): For local database setup
git clone <repository-url>
cd final- Launch Android Studio
- Select File → Open
- Navigate to the project directory
- Click OK to import the project
Android Studio will automatically sync Gradle dependencies. If not, manually trigger:
./gradlew buildOr use Android Studio's File → Sync Project with Gradle Files
Create a local.properties file in the root directory (if not present):
sdk.dir=/path/to/your/android/sdkFor Google Sign-In, configure one of the following:
Option 1: Environment Variable
export GOOGLE_WEB_CLIENT_ID="your-google-client-id"Option 2: .env File (create in root directory)
GOOGLE_WEB_CLIENT_ID=your-google-client-id
Option 3: local.properties
GOOGLE_WEB_CLIENT_ID=your-google-client-idThe application connects to a SQL Server database. Configure connection settings in:
app/src/main/java/com/example/brainify/config/DatabaseConfig.javaapp/src/main/java/com/example/brainify/utils/DatabaseConnectionUtil.java
Network settings can be configured in:
app/src/main/java/com/example/brainify/config/NetworkConfig.javaapp/src/main/res/xml/network_security_config.xml
Key build settings in app/build.gradle:
android {
namespace 'com.example.brainify'
compileSdk 36
defaultConfig {
applicationId "com.example.brainify"
minSdk 26
targetSdk 36
versionCode 1
versionName "1.0"
}
}- Navigate to the
databasedirectory:
cd database- Create a
.envfile with your database credentials:
SA_PASSWORD=YourStrongPassword123!
MSSQL_PID=Developer
DATABASE_NAME=BrainifyDB
SQL_SERVER_PORT=1433- Start the SQL Server container:
docker-compose up -d- Wait for the database to initialize (check logs):
docker-compose logs -f- Ensure your SQL Server is accessible from your development machine
- Update connection strings in the configuration files
- Run the SQL scripts in the
databasedirectory:main.sqlfor developmentprod.sqlfor production
# Debug build
./gradlew assembleDebug
# Release build
./gradlew assembleRelease# Install debug APK
./gradlew installDebug
# Or use Android Studio:
# Click Run button or press Shift+F10# Debug APK location
app/build/outputs/apk/debug/app-debug.apk
# Release APK location (after signing)
app/build/outputs/apk/release/app-release.apkThe application uses RESTful APIs for backend communication. API endpoints are configured in:
app/src/main/java/com/example/brainify/config/NetworkConfig.java- Retrofit service interfaces in the
servicespackage
- Authentication API: User registration, login, password reset
- Music API: Song, album, artist data
- Playlist API: Playlist management
- Chat API: Real-time messaging
- Notification API: Push notifications
Run tests using:
# Unit tests
./gradlew test
# Instrumented tests
./gradlew connectedAndroidTest- SplashActivity: App launch screen
- OnboardingActivity: First-time user experience
- SignInActivity / SignUpActivity: Authentication
- MainActivity: Home screen with music library
- NowPlayingActivity: Music player interface
- BrowseActivity: Music discovery
- SearchActivity: Search functionality
- ProfileActivity: User profile management
- SettingsActivity: App settings
- ChatActivity: Messaging interface
- AdminSongManagementActivity: Admin content management
- Room database integration may require additional configuration for full functionality
- Some features may require backend API endpoints to be fully configured
- Location services require proper permissions and device location enabled
- Enhanced offline mode with better caching
- Social features: follow artists, share playlists
- Advanced recommendation engine
- Podcast support
- Music video playback
- Cross-platform synchronization
- Voice commands integration
- Migration to Kotlin
- Jetpack Compose UI
- Enhanced error handling
- Performance optimizations
- Comprehensive test coverage
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/AmazingFeature
- Commit your changes:
git commit -m 'Add some AmazingFeature' - Push to the branch:
git push origin feature/AmazingFeature
- Open a Pull Request
- Follow Java coding conventions
- Use meaningful variable and method names
- Add comments for complex logic
- Maintain consistent formatting
- Write unit tests for new features
This project is distributed under the MIT License. See the LICENSE file for more information.
- Project: Brainify Music Streaming Platform
- Issues: Please use GitHub Issues for bug reports and feature requests
- Documentation: Check the
doc/directory for additional documentation
- Material Design Components
- OpenStreetMap for free mapping services
- All open-source libraries and frameworks used in this project
⭐ If you find this project useful, please consider giving it a star! ⭐
