Add comprehensive README.md and improve .gitignore

- Add professional README with complete project documentation
- Include architecture overview, installation guides, and troubleshooting
- Improve .gitignore with comprehensive Android development exclusions
- Add badges, project structure, and contribution guidelines

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-14 18:21:45 +00:00
parent 81da7510ef
commit 701b710acc
2 changed files with 346 additions and 4 deletions

130
.gitignore vendored
View File

@@ -1,9 +1,131 @@
# Gradle files
.gradle/
gradle-app.setting
!gradle-wrapper.jar
!.gradle
gradlew
gradlew.bat
# Local configuration file (sdk path, etc)
local.properties
**/build/
# Built application files
*.apk
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle generated files
.gradle/
build/
# Signing files
.signing/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/caches/
.idea/libraries/
.idea/modules.xml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches
.idea/modules.xml
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
.idea/gradle.xml
.idea/libraries
.idea/*.xml
.idea/copyright/profiles_settings.xml
# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
# google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
# Version control
vcs.xml
# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# Android Profiling
*.hprof
# Environment variables
.env
.env.local
.env.*.local
# APK build outputs
app/release/
app/debug/
*.apk

220
README.md Normal file
View File

@@ -0,0 +1,220 @@
# 📺 StreamPlayer
[![Android](https://img.shields.io/badge/Platform-Android-green.svg)](https://android.com)
[![Java](https://img.shields.io/badge/Language-Java-orange.svg)](https://www.oracle.com/java/)
[![API](https://img.shields.io/badge/Min%20SDK-21%2B-brightgreen.svg)](https://android-developers.blogspot.com/)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
Aplicación Android reproductora de streaming con optimización DNS para mejor rendimiento y acceso a contenido multimedia.
## 🌟 Características
- **▶️ Reproducción Streaming**: Reproductor de video streaming optimizado con ExoPlayer
- **🌐 Optimización DNS**: Configuración automática de DNS de Google (8.8.8.8, 8.8.4.4) para mejor conectividad
- **🔍 Resolución de URL**: Sistema avanzado que resuelve URLs ofuscadas de streaming
- **📱 Orientación Landscape**: Diseño optimizado para experiencia multimedia inmersiva
- **⚡ Alto Rendimiento**: Implementación asíncrona para respuesta rápida
- **🛡️ Manejo de Errores**: Sistema robusto de gestión de errores y estados
## 📋 Requisitos
- **Android SDK**: API 21 (Android 5.0) o superior
- **Target SDK**: API 33 (Android 13)
- **Permisos**:
- `INTERNET` - Acceso a streaming
- `ACCESS_NETWORK_STATE` - Verificación de conectividad
- `CHANGE_NETWORK_STATE` - Configuración de red
## 🏗️ Arquitectura
### Componentes Principales
- **MainActivity.java** (`/app/src/main/java/com/streamplayer/MainActivity.java`)
- Gestión del ciclo de vida del reproductor
- Configuración de ExoPlayer
- Manejo de estados (loading, error, reproducción)
- **StreamUrlResolver.java** (`/app/src/main/java/com/streamplayer/StreamUrlResolver.java`)
- Resolución de URLs ofuscadas
- Decodificación Base64
- Extracción de claves de JavaScript
- **DNSSetter.java** (`/app/src/main/java/com/streamplayer/DNSSetter.java`)
- Configuración de DNS de Google
- Optimización de red para streaming
- Pre-resolución de dominios
## 🚀 Instalación y Build
### Prerequisites
```bash
# Android SDK
# Java 8+
# Gradle 8.2+
```
### Build con Gradle
```bash
# Clone el repositorio
git clone https://gitea.cbcren.online/renato97/app.git
cd app
# Build APK debug
./gradlew assembleDebug
# Build APK release
./gradlew assembleRelease
```
### Build con Docker
```bash
# Construir imagen
docker build -t streamplayer .
# Ejecutar build
docker run --rm -v $(pwd)/output:/output streamplayer
```
### Build Script Alternativo
```bash
# Usar script de build
chmod +x build_apk.sh
./build_apk.sh
```
## 📱 Estructura del Proyecto
```
app/
├── src/main/
│ ├── java/com/streamplayer/
│ │ ├── MainActivity.java # Actividad principal
│ │ ├── StreamUrlResolver.java # Resolvedor de URLs
│ │ └── DNSSetter.java # Configuración DNS
│ ├── res/
│ │ ├── layout/
│ │ │ └── activity_main.xml # UI principal
│ │ ├── mipmap-*/ # Íconos de la app
│ │ ├── values/
│ │ │ ├── strings.xml # Cadenas de texto
│ │ │ ├── colors.xml # Colores
│ │ │ └── themes.xml # Temas
│ │ └── xml/ # Configuraciones
│ └── AndroidManifest.xml # Manifiesto Android
├── build.gradle # Configuración Gradle
└── proguard-rules.pro # Reglas ProGuard
```
## ⚙️ Configuración
### URL de Streaming
La aplicación está configurada por defecto para:
```
https://streamtpmedia.com/global2.php?stream=espn
```
### Configuración DNS
```java
// DNS configurados automáticamente
String[] GOOGLE_DNS = {"8.8.8.8", "8.8.4.4"};
```
## 🔧 Dependencias Principales
- **ExoPlayer 2.18.7**: Motor de reproducción multimedia
- **AndroidX AppCompat 1.6.1**: Compatibilidad hacia atrás
- **ConstraintLayout 2.1.4**: Layout moderno y flexible
## 🛠️ Desarrollo
### Flujo de Reproducción
1. **MainActivity** inicializa y configura DNS de Google
2. **StreamUrlResolver** obtiene y decodifica la URL real del stream
3. **ExoPlayer** inicia la reproducción con la URL resuelta
4. UI actualiza estados (loading, playing, error)
### Características Técnicas
- **Threading**: Operaciones de red en background thread
- **Memory Management**: Proper lifecycle management de ExoPlayer
- **Error Handling**: Captura y display de errores al usuario
- **Network Optimization**: Configuración DNS específica para streaming
## 📊 Build Configuration
| Atributo | Valor |
|----------|-------|
| `applicationId` | `com.streamplayer` |
| `minSdk` | 21 |
| `targetSdk` | 33 |
| `versionCode` | 1 |
| `versionName` | "1.0" |
| `compileSdk` | 33 |
## 🔐 Permisos y Seguridad
La aplicación requiere los siguientes permisos:
-`INTERNET` - Para streaming de contenido
-`ACCESS_NETWORK_STATE` - Para verificar conectividad
-`CHANGE_NETWORK_STATE` - Para optimización de red
## 🐛 Troubleshooting
### Problemas Comunes
**Error de Conexión**
- Verificar conexión a internet
- Confirmar configuración DNS
- Revisar disponibilidad del servicio de streaming
**Error de Reproducción**
- Validar formato de URL
- Verificar permisos de red
- Revisar logs de ExoPlayer
**Build Fail**
```bash
# Limpiar proyecto
./gradlew clean
# Rebuild
./gradlew build
```
## 📝 Logs y Debug
La aplicación incluye console logging para:
- Configuración DNS
- Resolución de URLs
- Estados del reproductor
- Errores de red
## 🤝 Contribución
1. Fork del repositorio
2. Feature branch (`git checkout -b feature/NuevaCaracteristica`)
3. Commit cambios (`git commit -m 'Add feature'`)
4. Push al branch (`git push origin feature/NuevaCaracteristica`)
5. Pull Request
## 📄 Licencia
Este proyecto está licenciado bajo la Licencia MIT - ver archivo [LICENSE](LICENSE) para detalles.
## 👨‍💻 Autor
**renato97** - [Gitea Profile](https://gitea.cbcren.online/renato97)
---
⚠️ **Disclaimer**: Esta aplicación es para fines educativos y de demostración. El usuario es responsable de cumplir con los términos de servicio de las plataformas de streaming utilizadas.
## 📞 Soporte
Para soporte y preguntas:
- 📧 Crear un issue en el repositorio
- 💬 Comentarios en el código
- 📱 Testing en dispositivos reales recomendado
---
**🔗 Repositorio**: https://gitea.cbcren.online/renato97/app