Thank you for your interest in contributing to the SpatialAudio HeadTracker Test project! This document provides guidelines for contributing to the project.
By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors.
Before creating a bug report, please check the existing issues to avoid duplicates. When creating a bug report, include:
- Device Information: Device model, Android version, and spatial audio support
- Clear Description: What you expected vs. what actually happened
- Steps to Reproduce: Detailed steps to reproduce the issue
- Screenshots: If applicable, add screenshots to help explain the problem
- Logcat Output: Relevant error messages or stack traces
Enhancement suggestions are welcome! Please provide:
- Use Case: Clear description of the problem or need
- Proposed Solution: How you envision the enhancement working
- Alternatives: Any alternative solutions you've considered
- Impact: Who would benefit from this enhancement
-
Fork the Repository
git clone https://github.com/YOUR_USERNAME/SpatialAudio-HeadTracker-Test.git
-
Create a Branch
git checkout -b feature/your-feature-name
-
Make Your Changes
- Follow the coding standards below
- Write clear, concise commit messages
- Add tests if applicable
-
Test Your Changes
- Test on devices with and without spatial audio support
- Verify the app builds without errors
- Check for lint warnings
-
Commit Your Changes
git add . git commit -m "Add feature: your feature description"
-
Push to Your Fork
git push origin feature/your-feature-name
-
Open a Pull Request
- Provide a clear description of the changes
- Reference any related issues
- Wait for review and address any feedback
Follow the Kotlin Coding Conventions:
- Use 4 spaces for indentation
- Use camelCase for variable and function names
- Use PascalCase for class names
- Maximum line length: 120 characters
- Add KDoc comments for all public classes, functions, and properties
- Include parameter descriptions and return value documentation
- Example:
/** * Brief description of the function. * * @param paramName Description of the parameter * @return Description of the return value */ fun functionName(paramName: Type): ReturnType { // Implementation }
- Follow Android's Architecture Guidelines
- Use Jetpack Compose best practices
- Implement proper lifecycle management
- Handle configuration changes appropriately
- Use string resources for all user-facing text
- Implement proper error handling
- Keep composables small and focused
- Use
rememberfor state that survives recomposition - Use
LaunchedEffectfor side effects - Use
DisposableEffectfor resource cleanup - Avoid using
stringResourceoutside of composable functions
- Always release audio resources properly
- Use try-catch blocks for operations that may fail
- Clean up threads and background tasks
- Handle null cases appropriately
Before submitting a PR, test on:
- Devices with spatial audio support
- Devices without spatial audio support
- Different Android versions (API 33+)
- Different audio output devices (speakers, wired headphones, Bluetooth)
- App builds without errors
- No lint warnings for modified code
- Spatial audio status displays correctly
- Audio playback starts and stops properly
- UI responds to device capabilities
- No memory leaks or resource issues
- Proper error handling for edge cases
app/
├── src/main/
│ ├── java/com/example/headtrackertest/
│ │ ├── MainActivity.kt # Main activity and core logic
│ │ └── ui/theme/ # Material3 theme files
│ ├── res/
│ │ ├── values/
│ │ │ ├── strings.xml # All string resources
│ │ │ ├── colors.xml # Color definitions
│ │ │ └── themes.xml # Theme configurations
│ │ └── mipmap/ # App launcher icons
│ └── AndroidManifest.xml # App manifest
└── build.gradle.kts # App build configuration
Use clear and descriptive commit messages:
- Use the imperative mood ("Add feature" not "Added feature")
- First line should be 50 characters or less
- Provide detailed description in the body if needed
- Reference issues with
#issue-number
Example:
Add volume control feature
- Implement volume slider in UI
- Add volume state management
- Update documentation
Fixes #123
If you have questions or need help:
- Check the README for basic information
- Review existing issues and pull requests
- Open a new issue with the "question" label
By contributing, you agree that your contributions will be licensed under the same license as the project (see LICENSE file).
Thank you for contributing to SpatialAudio HeadTracker Test!