We welcome contributions to TUIKit_Android! This document provides guidelines for contributing to the project.
By participating in this project, you agree to abide by our Code of Conduct. Please treat all community members with respect and create a welcoming environment for everyone.
- Android SDK with API level 21 (Android 5.0) or higher
- Gradle 8.0 or later
- Git for version control
-
Fork the Repository
# Fork the repo on GitHub, then clone your fork git git clone https://github.com/Tencent-RTC/TUIKit_Android.git cd TUIKit_Android/applocation
-
Open in Android Studio
# Open the project in Android Studio # File -> Open -> Select the android directory
-
Sync Project
- Android Studio will automatically sync Gradle dependencies
- Wait for the sync to complete
We strictly follow the Android Kotlin Style Guide and our project-specific coding standards. Please ensure your code adheres to these guidelines:
-
File Naming
- Kotlin source files end with
.kt - Java source files end with
.java - File names describe the main content
- Activity files:
ActivityName.kt - Fragment files:
FragmentName.kt - No spaces in file names
- Kotlin source files end with
-
Line Length
- Maximum 120 characters per line
- Exceptions: comments, URLs, import statements
-
Indentation and Spacing
- Use 4 spaces for indentation
- Opening brace
{on the same line - Closing brace
}on a new line - One blank line between methods and class declarations
-
Naming Conventions
- Use
camelCasefor variables, functions, and properties - Use
PascalCasefor classes and interfaces - Use
UPPER_SNAKE_CASEfor constants - Use descriptive names that clearly indicate purpose
- Use
-
Component-Based Architecture
- Each feature must be designed as an independent component
- Components must be self-contained and independently testable
- Clear responsibility boundaries for each component
-
Test-Driven Development (TDD)
- Write tests before implementation
- Follow Red-Green-Refactor cycle
- Maintain minimum 80% test coverage
-
Real-Time Communication Quality
- End-to-end integration tests for audio/video features
- Network quality monitoring and error handling
- Support for multiple audio routes and device adaptation
Before creating a new issue, please:
- Search existing issues to avoid duplicates
- Use the appropriate issue template
- Provide detailed reproduction steps for bugs
- Include relevant system information (Android version, device model, etc.)
For new features:
- Describe the use case and expected behavior
- Explain why this feature would be valuable
- Consider backward compatibility implications
-
Create a Feature Branch
git checkout -b feature/your-feature-name
-
Make Your Changes
- Follow coding standards
- Add tests for new functionality
- Update documentation as needed
-
Test Your Changes
# Run unit tests ./gradlew test # Run instrumented tests ./gradlew connectedAndroidTest # Test on physical devices when possible
-
Commit Your Changes
git add . git commit -m "feat: add amazing new feature"
Use conventional commit messages:
feat:for new featuresfix:for bug fixesdocs:for documentation changestest:for test additions/modificationsrefactor:for code refactoringstyle:for formatting changes
-
Push and Create PR
git push origin feature/your-feature-name
Then create a Pull Request on GitHub with:
- Clear title and description
- Reference to related issues
- Screenshots/videos for UI changes
- Test results and coverage information
All submissions require code review. We use GitHub's review system for this purpose. Reviews focus on:
- Code Quality: Adherence to coding standards
- Architecture: Proper component design and separation of concerns
- Testing: Adequate test coverage and quality
- Performance: Efficient implementation, especially for real-time features
- Documentation: Clear comments and updated documentation
- Use KDoc for Kotlin documentation
- Use JavaDoc for Java documentation
- Document public APIs thoroughly
- Include usage examples for complex functionality
- Keep documentation up-to-date with code changes
When adding new features:
- Update feature lists in README files
- Add usage examples
- Update architecture diagrams if needed
We follow Semantic Versioning:
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
Before releasing:
- All tests pass
- Documentation is updated
- CHANGELOG.md is updated
- Version numbers are bumped appropriately
- Release notes are prepared
If you need help:
- Documentation: Check our official documentation
- Issues: Search existing GitHub issues
- Community: Join our developer community discussions
Contributors will be recognized in our:
- CONTRIBUTORS.md file
- Release notes for significant contributions
- Project documentation
Thank you for contributing to TUIKit_Android! 🎉