Files
iptv-android-tv-2/IA/Développer-lecteur-vidéo-Google-TV (1).txt
T

4310 lines
123 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
From: https://chatgpt.com/c/6a299d9e-ca0c-83ea-babc-6cf02e126458
you asked
message time: 2026-06-10 18:24:21
je veux développer un lecteur de video sur google tv qui peut lire le flux extream
chatgpt response
Je vais cadrer ça proprement : Google TV = Android TV, donc le lecteur doit être natif Android, avec Media3/ExoPlayer pour éviter de réinventer la roue carrée, invention humaine déjà très complète. Je vérifie les docs actuelles avant de te donner une base technique exploitable.
Je pars du principe que par “flux extream” tu veux dire Xtream Codes / IPTV compatible Xtream. Donc oui, c’est faisable sur Google TV, qui repose sur Android TV. La voie propre : application Android TV native en Kotlin + Jetpack Compose for TV + Media3 ExoPlayer. Faire ça autrement serait une invitation à souffrir, donc évidemment l’humanité l’a déjà essayé.
1. Architecture recommandée
Stack technique
Élément Choix recommandé
Plateforme Android TV / Google TV
Langage Kotlin
Interface Jetpack Compose for TV
Lecteur vidéo AndroidX Media3 ExoPlayer
Flux supportés HLS .m3u8, MPEG-TS .ts, MP4, DASH selon le serveur
API Xtream player_api.php, get.php, xmltv.php
Stockage DataStore ou Room
Réseau Retrofit ou Ktor
Publication APK / AAB Google Play TV
Google recommande Compose for TV pour construire des interfaces adaptées à la télécommande, au focus et aux grands écrans. Media3 ExoPlayer est le composant moderne pour lire des fichiers ou flux vidéo/audio locaux ou distants. (Android Developers)
2. Fonctionnement d’un flux Xtream
Un accès Xtream contient généralement :
Serveur : http://exemple.com:8080
Username : user
Password : pass
Les services compatibles Xtream utilisent souvent des endpoints comme :
/player_api.php?username=USER&password=PASS
/player_api.php?username=USER&password=PASS&action=get_live_streams
/player_api.php?username=USER&password=PASS&action=get_vod_streams
/get.php?username=USER&password=PASS&type=m3u_plus&output=m3u8
/xmltv.php?username=USER&password=PASS
Ces formats sont largement utilisés par les fournisseurs Xtream compatibles, même si l’écosystème est assez “documentation éparpillée dans un tiroir en feu”. Les exemples publics montrent notamment get.php pour récupérer une playlist M3U et player_api.php pour récupérer les chaînes, VOD, séries et EPG. (GitHub)
3. Ce que ton application doit faire
MVP conseillé
La première version devrait contenir :
Écran de connexion Xtream
URL serveur
Nom d’utilisateur
Mot de passe
Validation du compte
Appel à player_api.php
Vérification que l’abonnement est actif
Catalogue
Chaînes Live
Films VOD
Séries
Catégories
Lecteur vidéo
Lecture HLS .m3u8
Lecture MPEG-TS .ts
Pause / lecture
Retour
Changement de chaîne
Gestion erreurs réseau
Interface TV
Navigation avec télécommande
Focus clair
Grandes cartes
Texte lisible
Aucun élément minuscule, ce n’est pas une appli pour fourmis.
4. Dépendances Android nécessaires
Dans build.gradle.kts :
dependencies {
val media3Version = "1.10.1"
implementation("androidx.media3:media3-exoplayer:$media3Version")
implementation("androidx.media3:media3-exoplayer-hls:$media3Version")
implementation("androidx.media3:media3-exoplayer-dash:$media3Version")
implementation("androidx.media3:media3-ui:$media3Version")
implementation("androidx.media3:media3-session:$media3Version")
implementation("androidx.tv:tv-foundation:1.0.0")
implementation("androidx.tv:tv-material:1.0.0")
implementation("com.squareup.retrofit2:retrofit:2.11.0")
implementation("com.squareup.retrofit2:converter-gson:2.11.0")
}
La version stable Media3 indiquée par Android Developers au 12 mai 2026 est 1.10.1, avec des modules pour ExoPlayer, HLS, DASH, UI, Leanback et MediaSession. (Android Developers)
5. Manifest Android TV
Dans AndroidManifest.xml :
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature
android:name="android.software.leanback"
android:required="true" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<application
android:banner="@drawable/tv_banner"
android:icon="@mipmap/ic_launcher"
android:label="Mon Lecteur TV"
android:theme="@style/Theme.App">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Pour être reconnu comme une app TV, Android demande une activité compatible TV avec le launcher Leanback, et Google Play impose aussi des critères de qualité spécifiques aux apps Android TV. (Android Developers)
6. Modèle de configuration Xtream
data class XtreamConfig(
val serverUrl: String,
val username: String,
val password: String
)
Normalisation simple :
fun cleanServerUrl(url: String): String {
return url.trim().removeSuffix("/")
}
7. Générer une URL de lecture
Pour une chaîne live :
fun buildLiveUrl(
config: XtreamConfig,
streamId: Int,
extension: String = "m3u8"
): String {
val baseUrl = cleanServerUrl(config.serverUrl)
return "$baseUrl/live/${config.username}/${config.password}/$streamId.$extension"
}
Pour VOD :
fun buildVodUrl(
config: XtreamConfig,
streamId: Int,
extension: String = "mp4"
): String {
val baseUrl = cleanServerUrl(config.serverUrl)
return "$baseUrl/movie/${config.username}/${config.password}/$streamId.$extension"
}
Pour séries :
fun buildSeriesUrl(
config: XtreamConfig,
episodeId: Int,
extension: String = "mp4"
): String {
val baseUrl = cleanServerUrl(config.serverUrl)
return "$baseUrl/series/${config.username}/${config.password}/$episodeId.$extension"
}
Certains fournisseurs utilisent .ts, d’autres .m3u8. Pour Google TV, privilégie HLS .m3u8 quand disponible : ExoPlayer supporte officiellement HLS, DASH et d’autres formats courants, mais les codecs internes doivent aussi être compatibles avec l’appareil. (Android Developers)
8. Lecteur vidéo avec Media3 ExoPlayer
Exemple simple en Kotlin Compose :
@Composable
fun VideoPlayerScreen(
streamUrl: String
) {
val context = LocalContext.current
val player = remember {
ExoPlayer.Builder(context).build().apply {
val mediaItem = MediaItem.fromUri(streamUrl)
setMediaItem(mediaItem)
prepare()
playWhenReady = true
}
}
DisposableEffect(Unit) {
onDispose {
player.release()
}
}
AndroidView(
modifier = Modifier.fillMaxSize(),
factory = { ctx ->
PlayerView(ctx).apply {
this.player = player
useController = true
keepScreenOn = true
}
}
)
}
Ce code lit directement une URL .m3u8, .ts, .mp4 ou autre format compatible. Media3 fournit l’interface Player pour lire, mettre en pause, chercher dans le flux et exposer les informations de lecture. (Android Developers)
9. API Retrofit pour Xtream
interface XtreamApi {
@GET("player_api.php")
suspend fun getAccountInfo(
@Query("username") username: String,
@Query("password") password: String
): XtreamAccountResponse
@GET("player_api.php")
suspend fun getLiveStreams(
@Query("username") username: String,
@Query("password") password: String,
@Query("action") action: String = "get_live_streams"
): List<LiveStreamDto>
@GET("player_api.php")
suspend fun getVodStreams(
@Query("username") username: String,
@Query("password") password: String,
@Query("action") action: String = "get_vod_streams"
): List<VodStreamDto>
@GET("player_api.php")
suspend fun getSeries(
@Query("username") username: String,
@Query("password") password: String,
@Query("action") action: String = "get_series"
): List<SeriesDto>
}
Exemple DTO live :
data class LiveStreamDto(
val name: String,
val stream_id: Int,
val stream_icon: String?,
val category_id: String?,
val epg_channel_id: String?
)
10. Interface TV recommandée
Accueil
[Continuer à regarder]
[Live TV]
Sport | News | Films | Enfants | Généraliste
[VOD]
Films récents | Action | Comédie | Drame
[Séries]
Derniers épisodes | Populaires
Navigation télécommande
L’interface doit être pensée pour :
boutons larges ;
focus visible ;
navigation horizontale/verticale fluide ;
retour rapide au lecteur ;
changement de chaîne avec haut/bas ;
recherche simple ;
favoris.
Sur TV, le focus est plus important que le design décoratif. Une belle interface impossible à naviguer avec une télécommande reste une punition, pas un produit.
11. Fonctions importantes à prévoir
Fonction Priorité
Lecture Live Très haute
Lecture VOD Haute
Séries Haute
Favoris Haute
Reprise de lecture Moyenne
EPG / guide TV Haute
Recherche Haute
Contrôle parental Moyenne
Multi-profils Moyenne
Catch-up TV Selon fournisseur
Sous-titres Haute pour VOD
Choix qualité Selon flux
12. Points sensibles
Légalité
Ton lecteur doit uniquement lire des flux pour lesquels l’utilisateur ou le fournisseur possède les droits. Ne construis pas une app orientée contournement, piratage, partage d’identifiants ou accès non autorisé. En plus d’être illégal, c’est le genre de décision qui transforme un projet commercial en dossier pénible.
Sécurité
Ne stocke pas les identifiants en clair.
Utilise :
EncryptedSharedPreferences ou DataStore chiffré ;
HTTPS si le fournisseur le permet ;
masquage du mot de passe ;
suppression rapide du compte ;
aucun log contenant username/password.
Compatibilité
Tous les flux IPTV ne sont pas propres. Certains serveurs envoient des .ts instables, des codecs douteux ou des playlists mal formées. ExoPlayer est solide, mais il ne fera pas de miracle avec un flux bricolé au chalumeau.
13. Plan de développement conseillé
Phase 1 — MVP
Créer projet Android TV Kotlin.
Ajouter Media3.
Ajouter écran login Xtream.
Tester player_api.php.
Afficher les chaînes live.
Lire une chaîne avec ExoPlayer.
Phase 2 — Catalogue
Catégories live.
VOD.
Séries.
Images.
Recherche.
Favoris.
Phase 3 — Expérience TV
Focus télécommande.
Design Google TV.
Écran lecteur avancé.
Zapping rapide.
Guide EPG.
Phase 4 — Produit commercial
Abonnements ou licence app.
Analytics anonymes.
Crash reporting.
Publication Google Play TV.
Politique de confidentialité.
Conditions d’utilisation.
Conclusion
Le meilleur choix technique est :
Android TV natif
+ Kotlin
+ Jetpack Compose for TV
+ Media3 ExoPlayer
+ API Xtream
C’est stable, compatible Google TV, publiable sur Play Store et suffisamment flexible pour lire du live, VOD, séries et EPG. Le vrai travail ne sera pas seulement le lecteur vidéo, mais la qualité de l’expérience TV : navigation fluide, zapping rapide, gestion des erreurs et interface propre. Le lecteur, lui, c’est la partie presque civilisée de cette aventure.
you asked
message time: 2026-06-10 18:26:49
ok, donne moi les fichiers à créer en zip
chatgpt response
Je vais te préparer un ZIP de base complet pour un lecteur Google TV compatible Xtream : projet Android Kotlin, écran de connexion, liste de chaînes et lecteur vidéo. Bref, le squelette avant que les bugs ne viennent réclamer leur héritage.
Je crée un projet minimal mais structuré, pas juste trois fichiers jetés dans un dossier comme une armoire de bureau municipal. Il contiendra déjà l’API Xtream, l’interface TV, et le lecteur Media3/ExoPlayer.
C’est prêt. J’ai créé un ZIP avec un projet Android TV / Google TV Kotlin pour lire un accès Xtream compatible, avec écran de connexion, récupération des chaînes Live et lecteur vidéo Media3/ExoPlayer. Voilà, un squelette propre, pas une pile de fichiers abandonnés dans un coin numérique.
Télécharger le ZIP
📦 Télécharger le projet Xtream Google TV Player
Ce que le ZIP contient
Projet Android Kotlin complet.
MainActivity.kt
Écran de connexion Xtream.
Liste des chaînes Live.
Lecteur vidéo avec Media3 ExoPlayer.
API Retrofit vers player_api.php.
Génération d’URL Live Xtream.
Manifest compatible Android TV / Google TV.
README avec les instructions de lancement.
Versions utilisées
Le projet utilise notamment Media3 1.10.1, version listée officiellement dans les releases AndroidX Media3, ainsi que les dépendances Compose TV tv-material:1.1.0 et tv-foundation:1.0.0. J’ai aussi configuré Compose avec le BOM 2026.04.01, recommandé dans les notes Compose d’avril 2026. (Android Developers)
Important
Je n’ai pas compilé le projet dans Android Studio ici, parce que l’environnement de génération Android complet n’est pas disponible dans cette session. Le ZIP est structuré pour être ouvert directement dans Android Studio. Il faudra ensuite faire une synchronisation Gradle, puis lancer sur un appareil ou émulateur Android TV / Google TV. Le projet utilise Android Gradle Plugin 9.0.1, dont la compatibilité officielle mentionne notamment JDK 17 et SDK Android 36. (Android Developers)
you asked
message time: 2026-06-10 18:32:52
ok. donne moi les commandes pour compiler et créer une apk et le transférer dans la box
chatgpt response
Voici les commandes Windows PowerShell pour compiler le projet, créer l’APK et l’envoyer dans ta box Google TV. Parce qu’évidemment, brancher une télé à un ordinateur n’était pas assez absurde, il fallait aussi lui parler en ADB.
Les commandes Android officielles passent par le Gradle Wrapper (gradlew.bat sous Windows) et l’installation peut se faire avec ADB. Android indique aussi que le projet AGP 9.0 utilise JDK 17 et Gradle 9.1.0 minimum. (Android Developers)
1. Décompresser le ZIP
Adapte le chemin selon l’endroit où tu as téléchargé le fichier.
cd D:\07-Logiciels\03-FIN65
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player.zip" -DestinationPath .
cd .\xtream-google-tv-player
2. Vérifier Java et ADB
java -version
adb version
Il faut avoir :
Java 17
ADB installé avec Android SDK Platform Tools
Si adb n’est pas reconnu, ajoute temporairement Platform Tools au PATH :
$env:Path += ";$env:LOCALAPPDATA\Android\Sdk\platform-tools"
adb version
3. Créer le Gradle Wrapper si absent
Dans le ZIP que je t’ai donné, il n’y a pas encore gradlew.bat. Donc il faut le générer une seule fois. Oui, évidemment, encore une petite cérémonie rituelle avant de compiler.
Installe Gradle si besoin :
winget install Gradle.Gradle
Puis dans le dossier du projet :
gradle wrapper --gradle-version 9.1.0
Vérifie :
.\gradlew.bat --version
4. Compiler l’APK debug
.\gradlew.bat clean
.\gradlew.bat :app:assembleDebug
L’APK sera créé ici :
app\build\outputs\apk\debug\app-debug.apk
5. Activer ADB sur la box Google TV
Sur ta box Google TV :
Paramètres
> Système
> À propos
> Cliquer 7 fois sur "Build" / "Version"
Ensuite :
Paramètres
> Système
> Options pour les développeurs
> Activer le débogage USB / débogage réseau / débogage sans fil
Selon la version Android de la box, tu auras soit une connexion simple en 5555, soit un système avec code d’appairage. Android permet le débogage via USB ou Wi-Fi avec ADB. (Android Developers)
Méthode A — Connexion ADB classique
Utilise cette méthode si la box affiche seulement son IP.
Exemple :
adb connect 192.168.1.50:5555
adb devices
Si la box apparaît dans la liste :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
Lancer l’application :
adb shell monkey -p ma.tkgraph.xtreamtv 1
Méthode B — Connexion avec code d’appairage
Sur certaines Google TV récentes, tu verras :
Adresse IP + port d’appairage
Code d’appairage
Commande :
adb pair 192.168.1.50:37123
Entre le code affiché sur la TV.
Ensuite connecte-toi au port ADB normal affiché par la box :
adb connect 192.168.1.50:42195
adb devices
Puis installe l’APK :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
Lancer l’app :
adb shell monkey -p ma.tkgraph.xtreamtv 1
6. Commande complète rapide
Quand tout est déjà configuré :
cd D:\07-Logiciels\03-FIN65\xtream-google-tv-player
.\gradlew.bat clean :app:assembleDebug
adb connect 192.168.1.50:5555
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell monkey -p ma.tkgraph.xtreamtv 1
Remplace :
192.168.1.50
par l’adresse IP réelle de ta box.
7. Désinstaller l’application si besoin
adb uninstall ma.tkgraph.xtreamtv
Puis réinstaller :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
8. Voir les logs en cas de bug
adb logcat | findstr Xtream
Ou logs Android complets :
adb logcat
9. Créer une APK release
Pour une APK release non signée :
.\gradlew.bat :app:assembleRelease
Chemin probable :
app\build\outputs\apk\release\app-release-unsigned.apk
Pour une installation directe sur ta box, utilise plutôt l’APK debug :
app-debug.apk
Elle est déjà signée automatiquement pour les tests. La release propre servira plus tard pour une distribution sérieuse, donc quand on arrêtera de vivre comme des développeurs qui installent tout à la main par Wi-Fi.
you asked
message time: 2026-06-10 19:15:48
voila ce que j'ai
chatgpt response
Parfait. D’après tes captures, tu as déjà l’essentiel :
Android SDK Platform 36.1 installé
Android SDK Build-Tools installé
Android SDK Platform-Tools installé
Command-line Tools installé
Android Emulator installé
Java disponible via Android Studio / PyCharm
Le projet est ici :
D:\07-Logiciels\11-IPTV Andoid TV 2
Le dossier correct est celui qui contient :
app
gradle
build.gradle.kts
settings.gradle.kts
README
Donc ne rentre pas dans le dossier xtream-google-tv-player à l’intérieur, sauf si c’est une deuxième copie. Oui, le zip s’est visiblement installé comme une poupée russe inutile, la poésie de Windows.
1. Ouvre PowerShell dans le bon dossier
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Vérifie que tu es au bon endroit :
dir
Tu dois voir :
app
gradle
build.gradle.kts
settings.gradle.kts
2. Configurer Java avec Android Studio
Tu as Java ici :
D:\Program Files\Android\Android Studio\jbr\bin\java.exe
Donc dans PowerShell :
$env:JAVA_HOME = "D:\Program Files\Android\Android Studio\jbr"
$env:Path = "$env:JAVA_HOME\bin;$env:Path"
Teste :
java -version
Tu dois obtenir une version Java/JDK, idéalement 17 ou plus.
3. Configurer ADB
Ton SDK est sûrement ici :
$env:ANDROID_HOME = "$env:LOCALAPPDATA\Android\Sdk"
$env:Path = "$env:ANDROID_HOME\platform-tools;$env:ANDROID_HOME\cmdline-tools\latest\bin;$env:Path"
Teste :
adb version
Si ça répond avec une version ADB, c’est bon.
4. Vérifier si gradlew.bat existe
Dans ton dossier projet, tape :
dir gradlew.bat
Si gradlew.bat existe
Passe directement à la compilation :
.\gradlew.bat clean
.\gradlew.bat :app:assembleDebug
Si gradlew.bat n’existe pas
Installe Gradle :
winget install Gradle.Gradle
Ferme PowerShell, rouvre-le, puis retourne dans le dossier :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Remets Java :
$env:JAVA_HOME = "D:\Program Files\Android\Android Studio\jbr"
$env:Path = "$env:JAVA_HOME\bin;$env:Path"
Puis crée le wrapper Gradle :
gradle wrapper --gradle-version 9.1.0
Ensuite compile :
.\gradlew.bat clean
.\gradlew.bat :app:assembleDebug
5. Emplacement de l’APK générée
Après compilation, ton APK sera ici :
.\app\build\outputs\apk\debug\app-debug.apk
Vérifie avec :
dir ".\app\build\outputs\apk\debug\"
6. Activer ADB sur la box Google TV
Sur ta box :
Paramètres
> Système
> À propos
> Version / Build
> Clique 7 fois
Puis :
Paramètres
> Système
> Options pour les développeurs
> Débogage USB ou Débogage sans fil
Sur Google TV récente, il y a souvent Débogage sans fil avec code d’appairage.
7. Connecter la box en Wi-Fi avec ADB
Méthode avec appairage
Sur la TV, ouvre :
Débogage sans fil
> Associer avec un code
Tu verras :
Adresse IP : 192.168.1.xx
Port d’appairage : 37xxx
Code : 123456
Sur ton PC :
adb pair 192.168.1.xx:37xxx
Entre le code affiché sur la TV.
Ensuite connecte-toi au port ADB normal affiché dans l’écran du débogage sans fil :
adb connect 192.168.1.xx:xxxxx
Vérifie :
adb devices
Tu dois voir un appareil en mode :
device
8. Installer l’APK dans la box
Depuis le dossier du projet :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
Si tout va bien :
Success
La civilisation tient encore debout, brièvement.
9. Lancer l’application
Essaie d’abord :
adb shell monkey -p ma.tkgraph.xtreamtv 1
Si ça ne lance rien, liste les packages :
adb shell pm list packages | findstr xtream
Puis lance avec le package trouvé.
10. Commandes complètes à copier-coller
Adapte seulement l’adresse IP de ta box.
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
$env:JAVA_HOME = "D:\Program Files\Android\Android Studio\jbr"
$env:ANDROID_HOME = "$env:LOCALAPPDATA\Android\Sdk"
$env:Path = "$env:JAVA_HOME\bin;$env:ANDROID_HOME\platform-tools;$env:ANDROID_HOME\cmdline-tools\latest\bin;$env:Path"
java -version
adb version
.\gradlew.bat clean
.\gradlew.bat :app:assembleDebug
adb connect 192.168.1.xx:xxxxx
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell monkey -p ma.tkgraph.xtreamtv 1
11. Si tu as une erreur Gradle
Lance :
.\gradlew.bat --version
Puis :
.\gradlew.bat :app:assembleDebug --stacktrace
L’erreur importante sera en bas. Pas les 300 lignes où Gradle raconte sa vie comme s’il écrivait ses mémoires.
you asked
message time: 2026-06-10 19:19:49
PS D:\07-Logiciels\11-IPTV Andoid TV 2> cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> dir
Directory: D:\07-Logiciels\11-IPTV Andoid TV 2
Mode LastWriteTime Length Name
d----- 10/06/2026 18:32 app
d----- 10/06/2026 18:32 gradle
d----- 10/06/2026 19:10 xtream-google-tv-player
-a---- 10/06/2026 18:32 67 .gitignore
-a---- 10/06/2026 18:32 170 build.gradle.kts
-a---- 10/06/2026 18:32 3539 README.md
-a---- 10/06/2026 18:32 340 settings.gradle.kts
PS D:\07-Logiciels\11-IPTV Andoid TV 2> D:\Program Files\Android\Android Studio\jbr\bin\java.exe
D:\Program : The term 'D:\Program' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1
D:\Program Files\Android\Android Studio\jbr\bin\java.exe
+ CategoryInfo : ObjectNotFound: (D:\Program:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS D:\07-Logiciels\11-IPTV Andoid TV 2> 'D:\Program Files\Android\Android Studio\jbr\bin\java.exe'
D:\Program Files\Android\Android Studio\jbr\bin\java.exe
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $env:JAVA_HOME = "D:\Program Files\Android\Android Studio\jbr"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $env:Path = "$env:JAVA_HOME\bin;$env:Path"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> java -version
openjdk version "21.0.10" 2026-01-20
OpenJDK Runtime Environment (build 21.0.10+-14961533-b1163.108)
OpenJDK 64-Bit Server VM (build 21.0.10+-14961533-b1163.108, mixed mode)
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $env:ANDROID_HOME = "$env:LOCALAPPDATA\Android\Sdk"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $env:Path = "$env:ANDROID_HOME\platform-tools;$env:ANDROID_HOME\cmdline-tools\latest\bin;$env:Path"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> adb version
Android Debug Bridge version 1.0.41
Version 37.0.0-14910828
Installed as C:\Users\abmou\AppData\Local\Android\Sdk\platform-tools\adb.exe
Running on Windows 10.0.26200
PS D:\07-Logiciels\11-IPTV Andoid TV 2> dir gradlew.bat
dir : Cannot find path 'D:\07-Logiciels\11-IPTV Andoid TV 2\gradlew.bat' because it does not exist.
At line:1 char:1
dir gradlew.bat
+ CategoryInfo : ObjectNotFound: (D:\07-Logiciels...V 2\gradlew.bat:String) [Get-ChildItem], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
PS D:\07-Logiciels\11-IPTV Andoid TV 2> winget install Gradle.Gradle
The msstore source requires that you view the following agreements before using.
Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US").
Do you agree to all the source agreements terms?
[Y] Yes [N] No: y
No package found matching input criteria.
PS D:\07-Logiciels\11-IPTV Andoid TV 2> winget install Gradle.Gradle
No package found matching input criteria.
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
Powershell réouvert :
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\WINDOWS\system32> cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $env:JAVA_HOME = "D:\Program Files\Android\Android Studio\jbr"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $env:Path = "$env:JAVA_HOME\bin;$env:Path"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> gradle wrapper --gradle-version 9.1.0
gradle : The term 'gradle' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
gradle wrapper --gradle-version 9.1.0
+ CategoryInfo : ObjectNotFound: (gradle:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
chatgpt response
Tu es presque prêt. Le problème est simple : Java fonctionne, ADB fonctionne, mais Gradle n’est pas installé et le projet n’a pas encore gradlew.bat.
Donc PowerShell te dit littéralement : “gradle ? connais pas.” Très utile, comme toujours.
1. Petite correction Java
Cette commande ne marche pas à cause des espaces dans Program Files :
D:\Program Files\Android\Android Studio\jbr\bin\java.exe
Pour exécuter un chemin avec espaces dans PowerShell, il faut utiliser & :
& "D:\Program Files\Android\Android Studio\jbr\bin\java.exe" -version
Mais tu as déjà bien configuré Java ensuite :
java -version
Et ça répond :
openjdk version "21.0.10"
Donc Java est OK.
2. Le vrai blocage
Cette erreur :
gradle : The term 'gradle' is not recognized
veut dire :
Gradle n’est pas installé ou pas dans le PATH.
Et comme winget install Gradle.Gradle ne trouve rien, on va faire plus fiable : installer Gradle manuellement avec PowerShell.
3. Installer Gradle manuellement
Copie-colle ce bloc complet dans PowerShell :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
$gradleVersion = "9.1.0"
$gradleInstallDir = "D:\Tools\Gradle"
$gradleZip = "$env:TEMP\gradle-$gradleVersion-bin.zip"
New-Item -ItemType Directory -Force -Path $gradleInstallDir
Invoke-WebRequest `
-Uri "https://services.gradle.org/distributions/gradle-$gradleVersion-bin.zip" `
-OutFile $gradleZip
Expand-Archive -Path $gradleZip -DestinationPath $gradleInstallDir -Force
$env:Path = "$gradleInstallDir\gradle-$gradleVersion\bin;$env:Path"
gradle -v
Si tout est bon, tu dois voir une réponse avec :
Gradle 9.1.0
4. Configurer Java + Android SDK
Toujours dans PowerShell :
$env:JAVA_HOME = "D:\Program Files\Android\Android Studio\jbr"
$env:ANDROID_HOME = "$env:LOCALAPPDATA\Android\Sdk"
$env:Path = "$env:JAVA_HOME\bin;$env:ANDROID_HOME\platform-tools;$env:ANDROID_HOME\cmdline-tools\latest\bin;D:\Tools\Gradle\gradle-9.1.0\bin;$env:Path"
java -version
adb version
gradle -v
Tu dois avoir les 3 commandes qui répondent.
5. Créer gradlew.bat
Maintenant, dans ton dossier projet :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
gradle wrapper --gradle-version 9.1.0 --distribution-type bin
Ensuite vérifie :
dir gradlew.bat
Tu dois voir :
gradlew.bat
Si ce fichier apparaît, la bête respire.
6. Compiler l’APK debug
Maintenant utilise le wrapper du projet :
.\gradlew.bat clean
.\gradlew.bat :app:assembleDebug
L’APK sera ici :
.\app\build\outputs\apk\debug\app-debug.apk
Vérifie :
dir ".\app\build\outputs\apk\debug\"
7. Commande complète à copier-coller
Tu peux utiliser ce bloc complet :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
$env:JAVA_HOME = "D:\Program Files\Android\Android Studio\jbr"
$env:ANDROID_HOME = "$env:LOCALAPPDATA\Android\Sdk"
$env:Path = "$env:JAVA_HOME\bin;$env:ANDROID_HOME\platform-tools;$env:ANDROID_HOME\cmdline-tools\latest\bin;D:\Tools\Gradle\gradle-9.1.0\bin;$env:Path"
java -version
adb version
gradle -v
gradle wrapper --gradle-version 9.1.0 --distribution-type bin
.\gradlew.bat clean
.\gradlew.bat :app:assembleDebug
8. Si le téléchargement Gradle bloque
Si Invoke-WebRequest échoue, essaie cette version :
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest `
-Uri "https://services.gradle.org/distributions/gradle-9.1.0-bin.zip" `
-OutFile "$env:TEMP\gradle-9.1.0-bin.zip"
Puis :
Expand-Archive -Path "$env:TEMP\gradle-9.1.0-bin.zip" -DestinationPath "D:\Tools\Gradle" -Force
$env:Path = "D:\Tools\Gradle\gradle-9.1.0\bin;$env:Path"
gradle -v
9. Installer l’APK sur la box après compilation
Quand l’APK existe, connecte ta box :
adb devices
Si elle est en Wi-Fi :
adb connect 192.168.1.xx:xxxxx
Puis installe :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
Lance l’application :
adb shell monkey -p ma.tkgraph.xtreamtv 1
10. Si tu as une erreur à la compilation
Lance cette commande :
.\gradlew.bat :app:assembleDebug --stacktrace
Et récupère surtout les 20 dernières lignes. Pas tout le roman Gradle, sinon on va finir par lire sa biographie non autorisée.
you asked
message time: 2026-06-10 19:23:58
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\WINDOWS\system32> cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $env:JAVA_HOME = "D:\Program Files\Android\Android Studio\jbr"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $env:Path = "$env:JAVA_HOME\bin;$env:Path"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> gradle wrapper --gradle-version 9.1.0
gradle : The term 'gradle' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
gradle wrapper --gradle-version 9.1.0
+ CategoryInfo : ObjectNotFound: (gradle:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS D:\07-Logiciels\11-IPTV Andoid TV 2> & "D:\Program Files\Android\Android Studio\jbr\bin\java.exe" -version
openjdk version "21.0.10" 2026-01-20
OpenJDK Runtime Environment (build 21.0.10+-14961533-b1163.108) OpenJDK 64-Bit Server VM (build 21.0.10+-14961533-b1163.108, mixed mode) PS D:\07-Logiciels\11-IPTV Andoid TV 2> java -version openjdk version "21.0.10" 2026-01-20 OpenJDK Runtime Environment (build 21.0.10+-14961533-b1163.108) OpenJDK 64-Bit Server VM (build 21.0.10+-14961533-b1163.108, mixed mode) PS D:\07-Logiciels\11-IPTV Andoid TV 2> cd "D:\07-Logiciels\11-IPTV Andoid TV 2" PS D:\07-Logiciels\11-IPTV Andoid TV 2>
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $gradleVersion = "9.1.0"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $gradleInstallDir = "D:\Tools\Gradle"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $gradleZip = "$env:TEMP\gradle-$gradleVersion-bin.zip"
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
PS D:\07-Logiciels\11-IPTV Andoid TV 2> New-Item -ItemType Directory -Force -Path $gradleInstallDir
Directory: D:\Tools
Mode LastWriteTime Length Name
d----- 10/06/2026 19:22 Gradle
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
PS D:\07-Logiciels\11-IPTV Andoid TV 2> Invoke-WebRequest `
-Uri "https://services.gradle.org/distributions/gradle-$gradleVersion-bin.zip" `
-OutFile $gradleZip
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
PS D:\07-Logiciels\11-IPTV Andoid TV 2> Expand-Archive -Path $gradleZip -DestinationPath $gradleInstallDir -Force
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $env:Path = "$gradleInstallDir\gradle-$gradleVersion\bin;$env:Path"
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
PS D:\07-Logiciels\11-IPTV Andoid TV 2> gradle -v
Welcome to Gradle 9.1.0!
Here are the highlights of this release:
Full Java 25 support
Native task graph visualization
Enhanced console output
For more details see https://docs.gradle.org/9.1.0/release-notes.html
Gradle 9.1.0
Build time: 2025-09-18 13:05:56 UTC
Revision: e45a8dbf2470c2e2474ccc25be9f49331406a07e
Kotlin: 2.2.0
Groovy: 4.0.28
Ant: Apache Ant(TM) version 1.10.15 compiled on August 25 2024
Launcher JVM: 21.0.10 (JetBrains s.r.o. 21.0.10+-14961533-b1163.108)
Daemon JVM: D:\Program Files\Android\Android Studio\jbr (no JDK specified, using current Java home)
OS: Windows 11 10.0 amd64
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $env:JAVA_HOME = "D:\Program Files\Android\Android Studio\jbr"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $env:ANDROID_HOME = "$env:LOCALAPPDATA\Android\Sdk"
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $env:Path = "$env:JAVA_HOME\bin;$env:ANDROID_HOME\platform-tools;$env:ANDROID_HOME\cmdline-tools\latest\bin;D:\Tools\Gradle\gradle-9.1.0\bin;$env:Path"
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
PS D:\07-Logiciels\11-IPTV Andoid TV 2> java -version
openjdk version "21.0.10" 2026-01-20
OpenJDK Runtime Environment (build 21.0.10+-14961533-b1163.108)
OpenJDK 64-Bit Server VM (build 21.0.10+-14961533-b1163.108, mixed mode)
PS D:\07-Logiciels\11-IPTV Andoid TV 2> adb version
Android Debug Bridge version 1.0.41
Version 37.0.0-14910828
Installed as C:\Users\abmou\AppData\Local\Android\Sdk\platform-tools\adb.exe
Running on Windows 10.0.26200
PS D:\07-Logiciels\11-IPTV Andoid TV 2> gradle -v
Gradle 9.1.0
Build time: 2025-09-18 13:05:56 UTC
Revision: e45a8dbf2470c2e2474ccc25be9f49331406a07e
Kotlin: 2.2.0
Groovy: 4.0.28
Ant: Apache Ant(TM) version 1.10.15 compiled on August 25 2024
Launcher JVM: 21.0.10 (JetBrains s.r.o. 21.0.10+-14961533-b1163.108)
Daemon JVM: D:\Program Files\Android\Android Studio\jbr (no JDK specified, using current Java home)
OS: Windows 11 10.0 amd64
PS D:\07-Logiciels\11-IPTV Andoid TV 2> cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
PS D:\07-Logiciels\11-IPTV Andoid TV 2> gradle wrapper --gradle-version 9.1.0 --distribution-type bin
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
FAILURE: Build failed with an exception.
Where:
Build file 'D:\07-Logiciels\11-IPTV Andoid TV 2\app\build.gradle.kts' line: 1
What went wrong:
An exception occurred applying plugin request [id: 'org.jetbrains.kotlin.android', version: '2.4.0']
Failed to apply plugin 'org.jetbrains.kotlin.android'.
Failed to apply plugin 'org.jetbrains.kotlin.android'
The 'org.jetbrains.kotlin.android' plugin is no longer required for Kotlin support since AGP 9.0.
Solution: Remove the 'org.jetbrains.kotlin.android' plugin from this project's build file: app\build.gradle.kts.
See https://kotl.in/gradle/agp-built-in-kotlin for more details.
java.lang.Throwable (no error message)
Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to generate a Build Scan (Powered by Develocity).
Get more help at https://help.gradle.org.
BUILD FAILED in 21s
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
chatgpt response
Tu as fait correctement la partie environnement :
Java : OK
ADB : OK
Gradle 9.1.0 : OK
SDK Android : OK
Le blocage vient maintenant du projet que je t’ai fourni : dans app/build.gradle.kts, il y a encore le plugin :
alias(libs.plugins.kotlin.android)
Avec Android Gradle Plugin 9.0+, ce plugin ne doit plus être utilisé, car Kotlin est maintenant intégré directement dans AGP. Android recommande de supprimer ce plugin du fichier module, du fichier racine et du catalogue libs.versions.toml. Bref, le futur est arrivé, et il casse les anciens fichiers comme un stagiaire trop motivé. (Android Developers)
1. Corriger les fichiers Gradle
Copie-colle ce bloc complet dans PowerShell :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
# Supprimer le plugin Kotlin Android du build racine
(Get-Content ".\build.gradle.kts") |
Where-Object { $_ -notmatch "libs\.plugins\.kotlin\.android" } |
Set-Content ".\build.gradle.kts"
# Supprimer le plugin Kotlin Android du module app
(Get-Content ".\app\build.gradle.kts") |
Where-Object { $_ -notmatch "libs\.plugins\.kotlin\.android" } |
Set-Content ".\app\build.gradle.kts"
# Supprimer la déclaration du plugin Kotlin Android dans le catalogue de versions
(Get-Content ".\gradle\libs.versions.toml") |
Where-Object { $_ -notmatch "^kotlin-android\s*=" } |
Set-Content ".\gradle\libs.versions.toml"
2. Vérifier que les lignes ont bien disparu
Select-String -Path ".\build.gradle.kts" -Pattern "kotlin.android"
Select-String -Path ".\app\build.gradle.kts" -Pattern "kotlin.android"
Select-String -Path ".\gradle\libs.versions.toml" -Pattern "kotlin-android"
Si tout est bon, ces commandes ne doivent rien afficher.
3. Recréer le Gradle Wrapper
Maintenant relance :
gradle wrapper --gradle-version 9.1.0 --distribution-type bin
Vérifie que gradlew.bat existe :
dir gradlew.bat
Tu dois voir :
gradlew.bat
4. Compiler l’APK
Ensuite :
.\gradlew.bat clean
.\gradlew.bat :app:assembleDebug
L’APK sera ici :
.\app\build\outputs\apk\debug\app-debug.apk
Vérifie :
dir ".\app\build\outputs\apk\debug\"
5. Commandes complètes après correction
Quand les fichiers sont corrigés, tu peux utiliser ce bloc :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
$env:JAVA_HOME = "D:\Program Files\Android\Android Studio\jbr"
$env:ANDROID_HOME = "$env:LOCALAPPDATA\Android\Sdk"
$env:Path = "$env:JAVA_HOME\bin;$env:ANDROID_HOME\platform-tools;$env:ANDROID_HOME\cmdline-tools\latest\bin;D:\Tools\Gradle\gradle-9.1.0\bin;$env:Path"
gradle wrapper --gradle-version 9.1.0 --distribution-type bin
.\gradlew.bat clean
.\gradlew.bat :app:assembleDebug
6. Installer dans la box Google TV
Après compilation :
adb devices
Si ta box est déjà connectée, tu verras un appareil.
Sinon, avec l’IP de la box :
adb connect 192.168.1.xx:xxxxx
Puis installe l’APK :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
Lance l’application :
adb shell monkey -p ma.tkgraph.xtreamtv 1
7. Si une nouvelle erreur apparaît
Lance :
.\gradlew.bat :app:assembleDebug --stacktrace
Et récupère uniquement les 30 dernières lignes. Le reste, c’est Gradle qui récite son roman intérieur.
you asked
message time: 2026-06-10 19:26:41
PS D:\07-Logiciels\11-IPTV Andoid TV 2> cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
PS D:\07-Logiciels\11-IPTV Andoid TV 2> # Supprimer le plugin Kotlin Android du build racine
PS D:\07-Logiciels\11-IPTV Andoid TV 2> (Get-Content ".\build.gradle.kts") |
Where-Object { $_ -notmatch "libs.plugins.kotlin.android" } |
Set-Content ".\build.gradle.kts"
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
PS D:\07-Logiciels\11-IPTV Andoid TV 2> # Supprimer le plugin Kotlin Android du module app
PS D:\07-Logiciels\11-IPTV Andoid TV 2> (Get-Content ".\app\build.gradle.kts") |
Where-Object { $_ -notmatch "libs.plugins.kotlin.android" } |
Set-Content ".\app\build.gradle.kts"
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
PS D:\07-Logiciels\11-IPTV Andoid TV 2> # Supprimer la déclaration du plugin Kotlin Android dans le catalogue de versions
PS D:\07-Logiciels\11-IPTV Andoid TV 2> (Get-Content ".\gradle\libs.versions.toml") |
Where-Object { $_ -notmatch "^kotlin-android\s*=" } |
Set-Content ".\gradle\libs.versions.toml"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> Select-String -Path ".\build.gradle.kts" -Pattern "kotlin.android"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> Select-String -Path ".\app\build.gradle.kts" -Pattern "kotlin.android"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> Select-String -Path ".\gradle\libs.versions.toml" -Pattern "kotlin-android"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> gradle wrapper --gradle-version 9.1.0 --distribution-type bin
BUILD SUCCESSFUL in 6s
1 actionable task: 1 executed
Consider enabling configuration cache to speed up this build: https://docs.gradle.org/9.1.0/userguide/configuration_cache_enabling.html
PS D:\07-Logiciels\11-IPTV Andoid TV 2> dir gradlew.bat
Directory: D:\07-Logiciels\11-IPTV Andoid TV 2
Mode LastWriteTime Length Name
-a---- 10/06/2026 19:25 2896 gradlew.bat
PS D:\07-Logiciels\11-IPTV Andoid TV 2> .\gradlew.bat clean
Downloading https://services.gradle.org/distributions/gradle-9.1.0-bin.zip
............10%.............20%.............30%.............40%.............50%............60%.............70%.............80%.............90%.............100%
BUILD SUCCESSFUL in 9s
1 actionable task: 1 up-to-date
Consider enabling configuration cache to speed up this build: https://docs.gradle.org/9.1.0/userguide/configuration_cache_enabling.html
PS D:\07-Logiciels\11-IPTV Andoid TV 2> .\gradlew.bat :app:assembleDebug
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:packageDebug'.
Could not create task ':app:compileDebugJavaWithJavac'.
Failed to calculate the value of task ':app:compileDebugJavaWithJavac' property 'javaCompiler'.
Cannot find a Java installation on your machine (Windows 11 10.0 amd64) matching: {languageVersion=17, vendor=any vendor, implementation=vendor-specific, nativeImageCapable=false}. Toolchain download repositories have not been configured.
Try:
Learn more about toolchain auto-detection and auto-provisioning at https://docs.gradle.org/9.1.0/userguide/toolchains.html#sec:auto_detection.
Learn more about toolchain repositories at https://docs.gradle.org/9.1.0/userguide/toolchains.html#sub:download_repositories.
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to generate a Build Scan (Powered by Develocity).
Get more help at https://help.gradle.org.
BUILD FAILED in 987ms
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
chatgpt response
Très bien, on avance. Là, Gradle Wrapper est créé, donc la partie pénible est passée. Le nouveau problème est clair :
Cannot find a Java installation matching: languageVersion=17
Ton projet demande explicitement un JDK 17, mais ta machine utilise :
Java 21
Donc Gradle cherche Java 17, ne le trouve pas, et s’effondre comme un meuble en kit monté sans notice.
Le plus simple : on supprime la demande forcée de JDK 17 dans app/build.gradle.kts, tout en gardant la compilation compatible Java 17.
1. Supprimer le bloc kotlin { jvmToolchain(17) }
Copie-colle ceci dans PowerShell :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
$content = Get-Content ".\app\build.gradle.kts" -Raw
$content = $content -replace '(?s)\s*kotlin\s*\{\s*jvmToolchain$17$\s*\}', ''
Set-Content ".\app\build.gradle.kts" $content
2. Vérifier que le bloc a disparu
Select-String -Path ".\app\build.gradle.kts" -Pattern "jvmToolchain"
Si rien ne s’affiche, c’est bon.
3. Nettoyer et recompiler
.\gradlew.bat clean
.\gradlew.bat :app:assembleDebug
4. Si tu veux faire tout d’un coup
Copie-colle ce bloc complet :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
$env:JAVA_HOME = "D:\Program Files\Android\Android Studio\jbr"
$env:ANDROID_HOME = "$env:LOCALAPPDATA\Android\Sdk"
$env:Path = "$env:JAVA_HOME\bin;$env:ANDROID_HOME\platform-tools;$env:ANDROID_HOME\cmdline-tools\latest\bin;D:\Tools\Gradle\gradle-9.1.0\bin;$env:Path"
$content = Get-Content ".\app\build.gradle.kts" -Raw
$content = $content -replace '(?s)\s*kotlin\s*\{\s*jvmToolchain$17$\s*\}', ''
Set-Content ".\app\build.gradle.kts" $content
.\gradlew.bat clean
.\gradlew.bat :app:assembleDebug
5. Résultat attendu
Si la compilation réussit, tu dois voir :
BUILD SUCCESSFUL
L’APK sera ici :
D:\07-Logiciels\11-IPTV Andoid TV 2\app\build\outputs\apk\debug\app-debug.apk
Vérifie :
dir ".\app\build\outputs\apk\debug\"
6. Ensuite installation sur la box
Quand l’APK existe :
adb devices
Puis, si ta box est en Wi-Fi :
adb connect 192.168.1.xx:xxxxx
Installe :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
Lance l’app :
adb shell monkey -p ma.tkgraph.xtreamtv 1
7. Si une autre erreur apparaît
Lance :
.\gradlew.bat :app:assembleDebug --stacktrace
Et récupère les 30 dernières lignes. Le reste, c’est Gradle qui fait du théâtre administratif.
you asked
message time: 2026-06-10 19:51:35
PS D:\07-Logiciels\11-IPTV Andoid TV 2> dir gradlew.bat
Directory: D:\07-Logiciels\11-IPTV Andoid TV 2
Mode LastWriteTime Length Name
-a---- 10/06/2026 19:25 2896 gradlew.bat
PS D:\07-Logiciels\11-IPTV Andoid TV 2> .\gradlew.bat clean
Downloading https://services.gradle.org/distributions/gradle-9.1.0-bin.zip
............10%.............20%.............30%.............40%.............50%............60%.............70%.............80%.............90%.............100%
BUILD SUCCESSFUL in 9s
1 actionable task: 1 up-to-date
Consider enabling configuration cache to speed up this build: https://docs.gradle.org/9.1.0/userguide/configuration_cache_enabling.html
PS D:\07-Logiciels\11-IPTV Andoid TV 2> .\gradlew.bat :app:assembleDebug
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:packageDebug'.
Could not create task ':app:compileDebugJavaWithJavac'.
Failed to calculate the value of task ':app:compileDebugJavaWithJavac' property 'javaCompiler'.
Cannot find a Java installation on your machine (Windows 11 10.0 amd64) matching: {languageVersion=17, vendor=any vendor, implementation=vendor-specific, nativeImageCapable=false}. Toolchain download repositories have not been configured.
Try:
Learn more about toolchain auto-detection and auto-provisioning at https://docs.gradle.org/9.1.0/userguide/toolchains.html#sec:auto_detection.
Learn more about toolchain repositories at https://docs.gradle.org/9.1.0/userguide/toolchains.html#sub:download_repositories.
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to generate a Build Scan (Powered by Develocity).
Get more help at https://help.gradle.org.
BUILD FAILED in 987ms
PS D:\07-Logiciels\11-IPTV Andoid TV 2> cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $content = Get-Content ".\app\build.gradle.kts" -Raw
PS D:\07-Logiciels\11-IPTV Andoid TV 2> $content = $content -replace '(?s)\skotlin\s{\sjvmToolchain$17$\s}', ''
PS D:\07-Logiciels\11-IPTV Andoid TV 2> Set-Content ".\app\build.gradle.kts" $content
PS D:\07-Logiciels\11-IPTV Andoid TV 2> Select-String -Path ".\app\build.gradle.kts" -Pattern "jvmToolchain"
PS D:\07-Logiciels\11-IPTV Andoid TV 2> .\gradlew.bat clean
BUILD SUCCESSFUL in 1s
1 actionable task: 1 up-to-date
Consider enabling configuration cache to speed up this build: https://docs.gradle.org/9.1.0/userguide/configuration_cache_enabling.html
PS D:\07-Logiciels\11-IPTV Andoid TV 2> .\gradlew.bat :app:assembleDebug
The Daemon will expire immediately since the JVM garbage collector is thrashing.
The project memory settings are likely not configured or are configured to an insufficient value.
The memory settings for this project must be adjusted to avoid this failure.
These settings can be adjusted by setting 'org.gradle.jvmargs' in 'gradle.properties'.
The currently configured max heap space is '512 MiB' and the configured max metaspace is '384 MiB'.
For more information on how to set these values, please refer to https://docs.gradle.org/9.1.0/userguide/build_environment.html#sec:configuring_jvm_memory in the Gradle documentation.
To disable this warning, set 'org.gradle.daemon.performance.disable-logging=true'.
Daemon is stopping immediately since the JVM garbage collector is thrashing
FAILURE: Build failed with an exception.
What went wrong:
Gradle build daemon has been stopped: since the JVM garbage collector is thrashing
Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to generate a Build Scan (Powered by Develocity).
Get more help at https://help.gradle.org.
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
chatgpt response
Bon, cette fois ce n’est plus Kotlin, ni Java, ni ADB. C’est Gradle qui manque de mémoire :
currently configured max heap space is '512 MiB'
Gradle build daemon has been stopped
512 Mo pour compiler Android en 2026, c’est à peu près comme vouloir faire tourner Photoshop sur une calculatrice. On va lui donner plus de RAM.
1. Fermer ce qui consomme beaucoup
Avant de relancer :
ferme l’émulateur Android si ouvert ;
ferme Android Studio temporairement ;
ferme Chrome si tu as 47 onglets ouverts comme tout être humain mal encadré.
Ensuite reste dans PowerShell.
2. Créer / corriger gradle.properties
Copie-colle exactement ceci :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
.\gradlew.bat --stop
$gradleProperties = @"
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m -Dfile.encoding=UTF-8 -XX:+UseG1GC
org.gradle.parallel=false
org.gradle.configuration-cache=false
android.useAndroidX=true
"@
[System.IO.File]::WriteAllText(
"D:\07-Logiciels\11-IPTV Andoid TV 2\gradle.properties",
$gradleProperties,
[System.Text.UTF8Encoding]::new($false)
)
3. Vérifier le fichier
type ".\gradle.properties"
Tu dois voir :
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m -Dfile.encoding=UTF-8 -XX:+UseG1GC
org.gradle.parallel=false
org.gradle.configuration-cache=false
android.useAndroidX=true
4. Relancer la compilation sans daemon
Utilise cette commande :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
5. Si ton PC manque de RAM
Si ça bloque encore, baisse à 2 Go au lieu de 4 Go :
$gradleProperties = @"
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=768m -Dfile.encoding=UTF-8 -XX:+UseG1GC
org.gradle.parallel=false
org.gradle.configuration-cache=false
android.useAndroidX=true
"@
[System.IO.File]::WriteAllText(
"D:\07-Logiciels\11-IPTV Andoid TV 2\gradle.properties",
$gradleProperties,
[System.Text.UTF8Encoding]::new($false)
)
Puis :
.\gradlew.bat --stop
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
6. Si la compilation réussit
Tu dois voir :
BUILD SUCCESSFUL
L’APK sera ici :
.\app\build\outputs\apk\debug\app-debug.apk
Vérifie :
dir ".\app\build\outputs\apk\debug\"
7. Installer sur la box ensuite
Quand l’APK existe :
adb devices
Puis :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
Lancer l’application :
adb shell monkey -p ma.tkgraph.xtreamtv 1
Lance d’abord la correction mémoire avec 4096m. Si l’erreur suivante apparaît, envoie uniquement le bloc à partir de FAILURE: Build failed, pas toute la tragédie administrative de Gradle.
chatgpt response
Ça y est : la compilation a réussi. Dans ton log, malgré les avertissements D8/R8 qui font leur petit spectacle dramatique, la ligne importante est bien :
BUILD SUCCESSFUL in 47s
36 actionable tasks: 36 executed
Donc l’APK debug a normalement été créé. Les warnings Kotlin/D8 sont bruyants, mais pas bloquants ici. Gradle adore faire peur aux gens, probablement par vocation administrative.
1. Vérifier que l’APK existe
Dans PowerShell :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
dir ".\app\build\outputs\apk\debug\"
Tu dois voir un fichier comme :
app-debug.apk
Chemin complet :
D:\07-Logiciels\11-IPTV Andoid TV 2\app\build\outputs\apk\debug\app-debug.apk
2. Connecter la box Google TV
Si ta box est déjà connectée
Tape :
adb devices
Si tu vois un appareil avec :
device
c’est bon.
Si tu dois connecter en Wi-Fi
Sur la box Google TV :
Paramètres
> Système
> Options pour les développeurs
> Débogage sans fil
Puis depuis PowerShell :
adb connect 192.168.1.xx:xxxxx
Remplace par l’IP et le port affichés sur la box.
Vérifie :
adb devices
3. Installer l’APK sur la box
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
Si tout va bien :
Success
4. Lancer l’application
adb shell monkey -p ma.tkgraph.xtreamtv 1
5. Commandes complètes à copier-coller
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
adb devices
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell monkey -p ma.tkgraph.xtreamtv 1
6. Si l’installation échoue
Cas 1 : ancienne version déjà installée
adb uninstall ma.tkgraph.xtreamtv
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
Cas 2 : version downgrade
adb install -r -d ".\app\build\outputs\apk\debug\app-debug.apk"
Cas 3 : appareil non autorisé
Si adb devices affiche :
unauthorized
regarde l’écran de la box et accepte l’autorisation ADB. Oui, même la télé veut une confirmation maintenant. Admirable époque.
7. Les warnings D8/R8
Tu peux les ignorer pour l’instant, car l’APK a été généré. Plus tard, on pourra nettoyer ça en alignant mieux :
Android Gradle Plugin ;
Compose ;
Kotlin intégré AGP ;
Media3 ;
dépendances TV.
Mais maintenant, l’étape suivante est simple : installer l’APK dans la box et tester l’ouverture de l’app.
you asked
message time: 2026-06-10 20:10:47
PS D:\07-Logiciels\11-IPTV Andoid TV 2> adb connect 192.168.1.124
failed to authenticate to 192.168.1.124:5555
PS D:\07-Logiciels\11-IPTV Andoid TV 2> adb connect 192.168.1.124
already connected to 192.168.1.124:5555
PS D:\07-Logiciels\11-IPTV Andoid TV 2> adb devices
List of devices attached
192.168.1.124:5555 device
PS D:\07-Logiciels\11-IPTV Andoid TV 2> adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
Performing Streamed Install
Success
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
chatgpt response
Parfait. L’APK est installé avec succès sur ta box Google TV.
La ligne importante :
Success
Donc là, l’application est bien dans la box. Petite victoire contre l’administration ADB, ce qui mérite presque une médaille en plastique.
1. Lancer l’application depuis PowerShell
Tape :
adb shell monkey -p ma.tkgraph.xtreamtv 1
Si l’app s’ouvre sur la TV, c’est bon.
2. Si elle ne s’ouvre pas
Vérifie d’abord que le package existe bien :
adb shell pm list packages | findstr xtream
Tu devrais voir :
package:ma.tkgraph.xtreamtv
Puis relance :
adb shell monkey -p ma.tkgraph.xtreamtv 1
3. Ouvrir depuis la box
Sur Google TV, va dans :
Applications
> Voir toutes les applications
> Xtream Google TV Player
Selon la box, l’application peut aussi apparaître dans :
Paramètres
> Applications
> Voir toutes les applications
Si elle n’apparaît pas directement sur l’accueil, c’est normal : certaines apps installées par ADB ne sont pas immédiatement mises en avant, parce que Google TV adore cacher les choses comme un meuble IKEA cache ses vis.
4. Tester l’application
Dans l’app, entre :
URL serveur : http://ton-serveur:port
Username : ton_identifiant
Password : ton_mot_de_passe
Exemple de format :
http://exemple.com:8080
Évite de mettre / à la fin de l’URL.
Correct :
http://exemple.com:8080
À éviter :
http://exemple.com:8080/
5. Voir les logs si l’app plante
Lance cette commande avant d’ouvrir l’app :
adb logcat | findstr xtream
Ou plus large :
adb logcat | findstr ma.tkgraph
Puis ouvre l’application :
adb shell monkey -p ma.tkgraph.xtreamtv 1
6. Si tu veux désinstaller / réinstaller
adb uninstall ma.tkgraph.xtreamtv
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
7. Commandes utiles maintenant
adb devices
adb shell monkey -p ma.tkgraph.xtreamtv 1
adb shell pm list packages | findstr xtream
adb logcat | findstr ma.tkgraph
Ton étape actuelle : lancer l’app et tester la connexion Xtream. Si l’écran s’ouvre, on passe ensuite à l’amélioration du design TV, favoris, catégories, EPG et zapping.
you asked
message time: 2026-06-10 20:12:46
je trouve l'appli, mais ouvrir est désactivée
chatgpt response
Ça veut dire que l’APK est bien installée, mais que Google TV ne voit probablement aucune activité lançable. Autrement dit : l’application existe, mais elle n’a pas de “porte d’entrée” déclarée correctement. Très moderne : une maison sans porte, mais avec un joli reçu d’installation.
On va corriger le AndroidManifest.xml.
1. Tester le lancement par ADB
Lance d’abord cette commande :
adb shell monkey -p ma.tkgraph.xtreamtv 1
Si tu vois une erreur du type :
No activities found to run
alors c’est bien le manifest qui est incomplet.
Teste aussi :
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Si cette commande ouvre l’app, alors l’activité existe, mais elle n’est pas bien déclarée pour le launcher TV.
2. Remplacer le manifest
Ouvre ce fichier :
D:\07-Logiciels\11-IPTV Andoid TV 2\app\src\main\AndroidManifest.xml
Remplace tout son contenu par ceci :
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature
android:name="android.software.leanback"
android:required="true" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<application
android:allowBackup="true"
android:banner="@drawable/tv_banner"
android:icon="@mipmap/ic_launcher"
android:label="Xtream TV Player"
android:supportsRtl="true"
android:theme="@style/Theme.XtreamTv">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Le point important est ici :
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
LEANBACK_LAUNCHER sert à Google TV / Android TV.
LAUNCHER aide certaines interfaces à activer le bouton Ouvrir. Parce qu’apparemment une seule catégorie n’était pas assez claire pour l’empire Android.
3. Correction rapide par PowerShell
Tu peux aussi remplacer le fichier directement avec PowerShell :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
$manifest = @"
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature
android:name="android.software.leanback"
android:required="true" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<application
android:allowBackup="true"
android:banner="@drawable/tv_banner"
android:icon="@mipmap/ic_launcher"
android:label="Xtream TV Player"
android:supportsRtl="true"
android:theme="@style/Theme.XtreamTv">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
"@
[System.IO.File]::WriteAllText(
"D:\07-Logiciels\11-IPTV Andoid TV 2\app\src\main\AndroidManifest.xml",
$manifest,
[System.Text.UTF8Encoding]::new($false)
)
4. Recompiler l’APK
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
5. Désinstaller l’ancienne version
Important : désinstalle l’ancienne app avant de réinstaller, sinon Google TV peut garder l’ancien état.
adb uninstall ma.tkgraph.xtreamtv
6. Réinstaller la nouvelle APK
adb install ".\app\build\outputs\apk\debug\app-debug.apk"
7. Lancer l’application
adb shell monkey -p ma.tkgraph.xtreamtv 1
Ou directement :
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
8. Vérifier l’activité lançable
Après installation, tape :
adb shell cmd package resolve-activity --brief ma.tkgraph.xtreamtv
Et aussi :
adb shell pm dump ma.tkgraph.xtreamtv | findstr MAIN
adb shell pm dump ma.tkgraph.xtreamtv | findstr LEANBACK
adb shell pm dump ma.tkgraph.xtreamtv | findstr LAUNCHER
Tu dois voir que MainActivity est bien associée à :
android.intent.action.MAIN
android.intent.category.LAUNCHER
android.intent.category.LEANBACK_LAUNCHER
Résumé
Ton installation est bonne. Le problème vient presque sûrement du manifest. Corrige-le, recompile, désinstalle, réinstalle.
Commande finale utile :
adb uninstall ma.tkgraph.xtreamtv
adb install ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell monkey -p ma.tkgraph.xtreamtv 1
you asked
message time: 2026-06-10 20:18:47
PS D:\07-Logiciels\11-IPTV Andoid TV 2> adb shell monkey -p ma.tkgraph.xtreamtv 1
bash arg: -p
bash arg: ma.tkgraph.xtreamtv
bash arg: 1
args: [-p, ma.tkgraph.xtreamtv, 1]
arg: "-p"
arg: "ma.tkgraph.xtreamtv"
arg: "1"
data="ma.tkgraph.xtreamtv"
** No activities found to run, monkey aborted.
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
elle a démarré avec :
PS D:\07-Logiciels\11-IPTV Andoid TV 2> adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Starting: Intent { cmp=ma.tkgraph.xtreamtv/.MainActivity }
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
chatgpt response
Très bien, le diagnostic est confirmé :
monkey : No activities found to run
am start -n ma.tkgraph.xtreamtv/.MainActivity : démarre
Donc l’activité existe, l’application fonctionne, mais elle n’est pas déclarée comme application lançable pour le launcher. C’est exactement le problème du AndroidManifest.xml.
Il faut ajouter :
<category android:name="android.intent.category.LAUNCHER" />
en plus de :
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
Parce que manifestement Google TV a besoin qu’on lui explique deux fois où est la porte.
1. Corriger le Manifest automatiquement
Copie-colle ceci dans PowerShell :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
$path = ".\app\src\main\AndroidManifest.xml"
$content = Get-Content $path -Raw
$leanback = ' <category android:name="android.intent.category.LEANBACK_LAUNCHER" />'
$launcher = ' <category android:name="android.intent.category.LAUNCHER" />'
if ($content -notmatch 'android.intent.category.LAUNCHER') {
$content = $content.Replace($leanback, "$leanback`r`n$launcher")
[System.IO.File]::WriteAllText(
"D:\07-Logiciels\11-IPTV Andoid TV 2\app\src\main\AndroidManifest.xml",
$content,
[System.Text.UTF8Encoding]::new($false)
)
}
type ".\app\src\main\AndroidManifest.xml"
Tu dois voir maintenant dans le fichier :
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
2. Recompiler l’APK
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Attends :
BUILD SUCCESSFUL
3. Désinstaller l’ancienne version
C’est important, sinon Google TV peut garder l’ancien état du launcher.
adb uninstall ma.tkgraph.xtreamtv
4. Réinstaller la nouvelle version
adb install ".\app\build\outputs\apk\debug\app-debug.apk"
5. Tester le lancement normal
adb shell monkey -p ma.tkgraph.xtreamtv 1
Cette fois, tu ne dois plus avoir :
No activities found to run
6. Vérifier les activités lançables
Teste aussi :
adb shell cmd package resolve-activity --brief -a android.intent.action.MAIN -c android.intent.category.LAUNCHER ma.tkgraph.xtreamtv
Puis :
adb shell cmd package resolve-activity --brief -a android.intent.action.MAIN -c android.intent.category.LEANBACK_LAUNCHER ma.tkgraph.xtreamtv
Tu dois voir MainActivity.
7. Si le bouton “Ouvrir” reste désactivé
Redémarre simplement la box :
adb reboot
Après redémarrage, va dans les applications. Le bouton Ouvrir devrait être actif.
Le fait que cette commande fonctionne :
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
confirme que le code de l’app n’est pas le problème. Il faut juste corriger la déclaration launcher, reconstruire, désinstaller, réinstaller. La plomberie Android dans toute sa splendeur.
you asked
message time: 2026-06-10 20:27:19
ça marche maintenant
chatgpt response
Parfait. L’application démarre maintenant sur la box Google TV. Donc le cycle infernal est validé :
Projet compilé
APK générée
APK installée
Application lançable
La cause était bien le AndroidManifest.xml : l’activité existait, mais elle n’était pas correctement exposée au launcher TV. Android, ce grand philosophe, avait donc installé l’application sans lui donner de bouton pour l’ouvrir.
Prochaine étape logique
Maintenant tu peux tester :
URL serveur Xtream
Username
Password
Puis vérifier :
si la connexion API fonctionne ;
si les chaînes Live se chargent ;
si le lecteur démarre bien le flux ;
si le zapping / retour télécommande fonctionne correctement.
Commandes à garder
Pour recompiler après modification :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Pour réinstaller :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
Pour lancer :
adb shell monkey -p ma.tkgraph.xtreamtv 1
Ou directement :
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
À faire maintenant
Avant de modifier plus loin, garde une copie du dossier actuel, parce que là tu as une version fonctionnelle de base :
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - version OK lancement" -Recurse
Ensuite, on pourra améliorer proprement :
design TV plus professionnel ;
mémorisation des identifiants Xtream ;
catégories Live ;
favoris ;
EPG / guide TV ;
zapping chaîne suivante/précédente ;
écran de chargement et messages d’erreur propres.
Bref, maintenant on passe de “ça démarre” à “ça ressemble à un vrai produit”, cette étape rare où le logiciel cesse d’être seulement une preuve que l’univers tolère notre souffrance.
you asked
message time: 2026-06-10 20:31:13
ok
chatgpt response
Nickel. Garde cette version comme base stable avant de toucher au reste.
Prochaine priorité conseillée
On devrait améliorer dans cet ordre :
Sauvegarde des identifiants Xtream
éviter de retaper URL, username, password à chaque ouverture.
Chargement des catégories Live
Sports, Films, News, Général, etc.
Interface TV plus propre
cartes plus grandes ;
focus visible ;
navigation télécommande fluide.
Favoris
ajouter / retirer une chaîne favorite.
Lecteur vidéo amélioré
bouton retour ;
chaîne suivante / précédente ;
message si le flux ne marche pas.
EPG / guide TV
programme actuel et suivant.
Sauvegarde recommandée
Fais une copie de sécurité maintenant :
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - OK lancement" -Recurse
Voilà. On a transformé un ZIP en APK installée sur Google TV. L’informatique a brièvement obéi, événement assez rare pour être noté.
you asked
message time: 2026-06-10 20:31:51
ok
chatgpt response
Très bien.
Pour la suite, la meilleure prochaine étape est de sauvegarder les identifiants Xtream dans l’application, pour ne pas les retaper à chaque lancement.
On fera ensuite :
1. Sauvegarde URL / username / password
2. Connexion automatique au démarrage
3. Liste des catégories Live
4. Favoris
5. Design TV plus propre
6. EPG
Quand tu veux continuer, on attaque directement les fichiers à modifier, avec le contenu complet de chaque fichier.
you asked
message time: 2026-06-10 20:33:02
ok
chatgpt response
On continue donc avec la sauvegarde automatique des identifiants Xtream. L’application retiendra :
Serveur
Username
Password
Au prochain lancement, elle essaiera de se reconnecter automatiquement. Oui, incroyable, une application qui se souvient de quelque chose, la technologie tient encore debout.
Pour cette première version, on utilise SharedPreferences. C’est suffisant pour tester. Plus tard, on passera en stockage chiffré propre.
1. Fais une sauvegarde avant modification
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - OK sauvegarde avant identifiants" -Recurse
2. Copie-colle ce bloc PowerShell complet
Il va créer/modifier les fichiers nécessaires.
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
New-Item -ItemType Directory -Force -Path ".\app\src\main\java\ma\tkgraph\xtreamtv\data\storage"
$configStorage = @'
package ma.tkgraph.xtreamtv.data.storage
import android.content.Context
import ma.tkgraph.xtreamtv.data.model.XtreamConfig
class ConfigStorage(context: Context) {
private val preferences = context.applicationContext.getSharedPreferences(
PREFERENCES_NAME,
Context.MODE_PRIVATE
)
fun save(config: XtreamConfig) {
preferences.edit()
.putString(KEY_SERVER_URL, config.serverUrl.trim())
.putString(KEY_USERNAME, config.username.trim())
.putString(KEY_PASSWORD, config.password.trim())
.apply()
}
fun load(): XtreamConfig? {
val serverUrl = preferences.getString(KEY_SERVER_URL, null)
?.trim()
?.takeIf { it.isNotBlank() }
?: return null
val username = preferences.getString(KEY_USERNAME, null)
?.trim()
?.takeIf { it.isNotBlank() }
?: return null
val password = preferences.getString(KEY_PASSWORD, null)
?.trim()
?.takeIf { it.isNotBlank() }
?: return null
return XtreamConfig(
serverUrl = serverUrl,
username = username,
password = password
)
}
fun clear() {
preferences.edit().clear().apply()
}
companion object {
private const val PREFERENCES_NAME = "xtream_config"
private const val KEY_SERVER_URL = "server_url"
private const val KEY_USERNAME = "username"
private const val KEY_PASSWORD = "password"
}
}
'@
[System.IO.File]::WriteAllText(
"D:\07-Logiciels\11-IPTV Andoid TV 2\app\src\main\java\ma\tkgraph\xtreamtv\data\storage\ConfigStorage.kt",
$configStorage,
[System.Text.UTF8Encoding]::new($false)
)
$loginScreen = @'
package ma.tkgraph.xtreamtv.ui.screens
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.widthIn
import androidx.compose.material3.Button
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.unit.dp
import kotlinx.coroutines.launch
import ma.tkgraph.xtreamtv.data.model.LiveStreamDto
import ma.tkgraph.xtreamtv.data.model.XtreamConfig
import ma.tkgraph.xtreamtv.data.network.XtreamApiFactory
import ma.tkgraph.xtreamtv.data.repository.XtreamRepository
@Composable
fun LoginScreen(
initialConfig: XtreamConfig? = null,
initialErrorMessage: String? = null,
onLoginSuccess: (XtreamConfig, List<LiveStreamDto>) -> Unit
) {
var serverUrl by remember(initialConfig?.serverUrl) {
mutableStateOf(initialConfig?.serverUrl.orEmpty())
}
var username by remember(initialConfig?.username) {
mutableStateOf(initialConfig?.username.orEmpty())
}
var password by remember(initialConfig?.password) {
mutableStateOf(initialConfig?.password.orEmpty())
}
var isLoading by remember { mutableStateOf(false) }
var errorMessage by remember(initialErrorMessage) {
mutableStateOf(initialErrorMessage)
}
val scope = rememberCoroutineScope()
Box(
modifier = Modifier
.fillMaxSize()
.background(MaterialTheme.colorScheme.background)
.padding(48.dp),
contentAlignment = Alignment.Center
) {
Column(
modifier = Modifier.widthIn(max = 720.dp),
verticalArrangement = Arrangement.spacedBy(18.dp),
horizontalAlignment = Alignment.Start
) {
Text(
text = "Xtream TV Player",
style = MaterialTheme.typography.headlineLarge,
color = MaterialTheme.colorScheme.onBackground
)
Text(
text = "Connecte ton accès Xtream compatible pour charger les chaînes Live.",
style = MaterialTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onBackground.copy(alpha = 0.75f)
)
Spacer(modifier = Modifier.height(8.dp))
OutlinedTextField(
modifier = Modifier.fillMaxWidth(),
value = serverUrl,
onValueChange = { serverUrl = it },
label = { Text("Serveur : http://exemple.com:8080") },
singleLine = true
)
OutlinedTextField(
modifier = Modifier.fillMaxWidth(),
value = username,
onValueChange = { username = it },
label = { Text("Utilisateur") },
singleLine = true
)
OutlinedTextField(
modifier = Modifier.fillMaxWidth(),
value = password,
onValueChange = { password = it },
label = { Text("Mot de passe") },
singleLine = true,
visualTransformation = PasswordVisualTransformation()
)
Button(
enabled = !isLoading &&
serverUrl.isNotBlank() &&
username.isNotBlank() &&
password.isNotBlank(),
onClick = {
scope.launch {
isLoading = true
errorMessage = null
runCatching {
val config = XtreamConfig(
serverUrl = serverUrl.trim(),
username = username.trim(),
password = password.trim()
)
val repository = XtreamRepository(
XtreamApiFactory.create(config.serverUrl)
)
val account = repository.checkAccount(
username = config.username,
password = config.password
)
val isAuthorized = account.userInfo?.auth == "1"
val isActive = account.userInfo?.status.equals(
other = "Active",
ignoreCase = true
)
if (!isAuthorized || !isActive) {
error("Compte non autorisé ou abonnement inactif.")
}
val streams = repository.loadLiveStreams(
username = config.username,
password = config.password
)
onLoginSuccess(config, streams)
}.onFailure { throwable ->
errorMessage = throwable.message ?: "Connexion impossible au serveur."
}
isLoading = false
}
}
) {
if (isLoading) {
CircularProgressIndicator(
modifier = Modifier.height(22.dp),
strokeWidth = 2.dp
)
} else {
Text("Se connecter")
}
}
errorMessage?.let { message ->
Text(
text = message,
color = MaterialTheme.colorScheme.error,
style = MaterialTheme.typography.bodyMedium
)
}
}
}
}
'@
[System.IO.File]::WriteAllText(
"D:\07-Logiciels\11-IPTV Andoid TV 2\app\src\main\java\ma\tkgraph\xtreamtv\ui\screens\LoginScreen.kt",
$loginScreen,
[System.Text.UTF8Encoding]::new($false)
)
$mainActivity = @'
package ma.tkgraph.xtreamtv
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.dp
import ma.tkgraph.xtreamtv.data.model.LiveStreamDto
import ma.tkgraph.xtreamtv.data.model.XtreamConfig
import ma.tkgraph.xtreamtv.data.network.XtreamApiFactory
import ma.tkgraph.xtreamtv.data.repository.XtreamRepository
import ma.tkgraph.xtreamtv.data.storage.ConfigStorage
import ma.tkgraph.xtreamtv.ui.screens.HomeScreen
import ma.tkgraph.xtreamtv.ui.screens.LoginScreen
import ma.tkgraph.xtreamtv.ui.screens.PlayerScreen
import ma.tkgraph.xtreamtv.ui.theme.XtreamTvTheme
import ma.tkgraph.xtreamtv.util.XtreamUrlBuilder
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
XtreamTvTheme {
XtreamTvApp()
}
}
}
}
private sealed interface AppScreen {
data object Loading : AppScreen
data object Login : AppScreen
data object Home : AppScreen
data class Player(val title: String, val url: String) : AppScreen
}
@Composable
private fun XtreamTvApp() {
val context = LocalContext.current
val configStorage = remember { ConfigStorage(context) }
var screen by remember { mutableStateOf<AppScreen>(AppScreen.Loading) }
var config by remember { mutableStateOf<XtreamConfig?>(null) }
var liveStreams by remember { mutableStateOf<List<LiveStreamDto>>(emptyList()) }
var loginErrorMessage by remember { mutableStateOf<String?>(null) }
LaunchedEffect(Unit) {
val savedConfig = configStorage.load()
if (savedConfig == null) {
screen = AppScreen.Login
return@LaunchedEffect
}
runCatching {
val streams = loadLiveStreamsFromServer(savedConfig)
config = savedConfig
liveStreams = streams
loginErrorMessage = null
screen = AppScreen.Home
}.onFailure {
configStorage.clear()
config = null
liveStreams = emptyList()
loginErrorMessage = "Connexion automatique impossible. Vérifie tes identifiants."
screen = AppScreen.Login
}
}
when (val currentScreen = screen) {
AppScreen.Loading -> LoadingScreen(
message = "Connexion automatique en cours..."
)
AppScreen.Login -> LoginScreen(
initialConfig = configStorage.load(),
initialErrorMessage = loginErrorMessage,
onLoginSuccess = { newConfig, streams ->
configStorage.save(newConfig)
config = newConfig
liveStreams = streams
loginErrorMessage = null
screen = AppScreen.Home
}
)
AppScreen.Home -> HomeScreen(
streams = liveStreams,
onStreamSelected = { stream ->
val currentConfig = config ?: return@HomeScreen
val url = XtreamUrlBuilder.liveUrl(
config = currentConfig,
streamId = stream.streamId,
extension = "m3u8"
)
screen = AppScreen.Player(
title = stream.name.orEmpty().ifBlank { "Chaîne ${stream.streamId}" },
url = url
)
},
onLogout = {
configStorage.clear()
config = null
liveStreams = emptyList()
loginErrorMessage = null
screen = AppScreen.Login
}
)
is AppScreen.Player -> PlayerScreen(
title = currentScreen.title,
streamUrl = currentScreen.url,
onBack = { screen = AppScreen.Home }
)
}
}
@Composable
private fun LoadingScreen(
message: String
) {
Box(
modifier = Modifier
.fillMaxSize()
.background(MaterialTheme.colorScheme.background),
contentAlignment = Alignment.Center
) {
Column(
verticalArrangement = Arrangement.spacedBy(18.dp),
horizontalAlignment = Alignment.CenterHorizontally
) {
CircularProgressIndicator()
Text(
text = message,
color = MaterialTheme.colorScheme.onBackground,
style = MaterialTheme.typography.bodyLarge
)
}
}
}
private suspend fun loadLiveStreamsFromServer(
config: XtreamConfig
): List<LiveStreamDto> {
val repository = XtreamRepository(
XtreamApiFactory.create(config.serverUrl)
)
val account = repository.checkAccount(
username = config.username,
password = config.password
)
val isAuthorized = account.userInfo?.auth == "1"
val isActive = account.userInfo?.status.equals(
other = "Active",
ignoreCase = true
)
if (!isAuthorized || !isActive) {
error("Compte non autorisé ou abonnement inactif.")
}
return repository.loadLiveStreams(
username = config.username,
password = config.password
)
}
'@
[System.IO.File]::WriteAllText(
"D:\07-Logiciels\11-IPTV Andoid TV 2\app\src\main\java\ma\tkgraph\xtreamtv\MainActivity.kt",
$mainActivity,
[System.Text.UTF8Encoding]::new($false)
)
3. Compiler
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Résultat attendu :
BUILD SUCCESSFUL
4. Réinstaller sur la box
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
Puis lance :
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Ou :
adb shell monkey -p ma.tkgraph.xtreamtv 1
Résultat attendu
Après cette modification :
première ouverture : tu saisis les identifiants Xtream ;
connexion réussie : l’app sauvegarde les identifiants ;
prochaine ouverture : connexion automatique ;
bouton Déconnexion : supprime les identifiants sauvegardés.
Voilà, l’app commence enfin à avoir une mémoire. Modeste, certes, mais déjà plus fiable que beaucoup de réunions humaines.
you asked
message time: 2026-06-10 20:37:36
ok, l'appli a bien sa mémoire
chatgpt response
Parfait. Donc maintenant l’app sait :
1. Sauvegarder les identifiants Xtream
2. Se reconnecter automatiquement au démarrage
3. Supprimer les identifiants avec Déconnexion
On a donc une vraie base fonctionnelle. Une application avec de la mémoire, chose qui reste malheureusement supérieure à certains logiciels payants.
À faire avant la suite
Fais une sauvegarde de cette version stable :
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - OK mémoire Xtream" -Recurse
Prochaine amélioration recommandée
La suite logique : ajouter les catégories Live.
Actuellement, l’app charge probablement toutes les chaînes en une seule liste. Il faut maintenant organiser :
Toutes les chaînes
Sports
Films
News
Documentaires
Enfants
Maroc
France
Arabes
Favoris
Techniquement, on va ajouter :
1. API get_live_categories
2. Modèle LiveCategoryDto
3. Affichage des catégories à gauche
4. Filtrage des chaînes par category_id
5. Bouton “Toutes”
6. Préparation pour “Favoris”
Commande Xtream utilisée :
/player_api.php?username=USER&password=PASS&action=get_live_categories
Ensuite, chaque chaîne Live possède déjà généralement :
category_id
Donc on peut filtrer proprement sans bricoler la liste comme un humain pressé un vendredi à 18h.
État actuel du projet
Tu as maintenant :
Élément Statut
Compilation APK OK
Installation Google TV OK
Lancement application OK
Connexion Xtream OK
Mémoire identifiants OK
Connexion automatique OK
Catégories Live Prochaine étape
Favoris Après catégories
EPG Après favoris
Design TV premium Après structure fonctionnelle
La prochaine intervention doit modifier principalement :
XtreamApi.kt
LiveCategoryDto.kt
XtreamRepository.kt
MainActivity.kt
HomeScreen.kt
On peut passer à l’étape catégories Live avec les fichiers complets à remplacer.
you asked
message time: 2026-06-10 20:39:33
procède directement et donne moi le fichier zip avec tous les fichiers modifiés
chatgpt response
C’est prêt. J’ai préparé le ZIP avec les fichiers modifiés pour ajouter les catégories Live Xtream et garder les corrections déjà validées : mémoire des identifiants, launcher Google TV, Gradle corrigé, etc. Bref, pas juste trois fichiers balancés au hasard dans un sac plastique numérique.
Télécharger le ZIP
📦 Télécharger la mise à jour Catégories Live
Ce que le ZIP ajoute
Appel API Xtream :
action=get_live_categories
Nouveau modèle :
LiveCategoryDto.kt
Affichage des catégories à gauche.
Filtrage des chaînes par catégorie.
Compteur de chaînes par catégorie.
Catégorie “Toutes”.
Catégorie “Non classées” si nécessaire.
Conservation de la mémoire des identifiants.
Manifest corrigé avec :
LEANBACK_LAUNCHER
LAUNCHER
Fichiers inclus
build.gradle.kts
gradle.properties
gradle/libs.versions.toml
app/build.gradle.kts
app/src/main/AndroidManifest.xml
app/src/main/java/ma/tkgraph/xtreamtv/MainActivity.kt
app/src/main/java/ma/tkgraph/xtreamtv/data/model/LiveCategoryDto.kt
app/src/main/java/ma/tkgraph/xtreamtv/data/network/XtreamApi.kt
app/src/main/java/ma/tkgraph/xtreamtv/data/repository/XtreamRepository.kt
app/src/main/java/ma/tkgraph/xtreamtv/data/storage/ConfigStorage.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/LoginScreen.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/HomeScreen.kt
apply-update.ps1
README_UPDATE_CATEGORIES.md
Installation rapide
Décompresse le ZIP dans ton projet :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - Backup avant categories" -Recurse
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player-categories-update.zip" -DestinationPath "D:\07-Logiciels\11-IPTV Andoid TV 2" -Force
Puis compile :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Puis installe sur la box :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Option avec script inclus
Après extraction, tu peux aussi lancer :
.\apply-update.ps1
Ce script fait la sauvegarde, copie les fichiers et lance la compilation. Oui, un script qui travaille pendant que nous contemplons l’absurdité du cycle compiler-installer-tester.
you asked
message time: 2026-06-10 21:01:54
ça marche. on avance plus rapidement maintenant :
Design sophistiqué
Possibilité de mettre des chaines en favori
quand on fait retour arrière, on revient dans le menu à la même chaine et même catégorie
possibilité d'épingler une chaine pour démarrer directement avec cette chaine
afficher la résolution de la chaine
zone de recherche de catégorie
zone de recherche de chaine
naviguer avec les boutons droite/gauche pour zapper entre les chaines
chatgpt response
C’est prêt. J’ai préparé un ZIP avec les fichiers modifiés pour passer à une version plus avancée de l’app. On commence enfin à quitter le territoire du “ça démarre” pour entrer dans celui du “ça ressemble à un vrai produit”, événement rare dans le monde Android.
Télécharger le ZIP
📦 Télécharger la mise à jour avancée Google TV
Fonctions ajoutées
Cette mise à jour ajoute :
design TV plus sophistiqué ;
favoris chaînes ;
catégorie Favoris automatique ;
retour depuis le lecteur vers la même catégorie et la même chaîne ;
chaîne épinglée au démarrage ;
affichage de la résolution détectée pendant la lecture ;
recherche de catégorie ;
recherche de chaîne ;
zapping gauche/droite dans le lecteur ;
raccourcis clavier/test :← / → : chaîne précédente / suivante ;
F : favori ;
P : épingler.
Fichiers modifiés dans le ZIP
app/src/main/java/ma/tkgraph/xtreamtv/MainActivity.kt
app/src/main/java/ma/tkgraph/xtreamtv/data/storage/ConfigStorage.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/HomeScreen.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/PlayerScreen.kt
README_UPDATE_ADVANCED_TV.md
apply-update.ps1
Installation rapide
Décompresse le ZIP dans ton projet :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - Backup avant update avancee" -Recurse
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player-advanced-update.zip" -DestinationPath "D:\07-Logiciels\11-IPTV Andoid TV 2" -Force
Puis compile :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Installe sur la box :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Option avec script
Après extraction :
.\apply-update.ps1
Puis :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Note importante
Je n’ai pas compilé l’APK ici dans ton environnement Windows, donc si Gradle décide encore de réciter de la poésie d’erreur, envoie seulement le bloc à partir de :
FAILURE: Build failed
Pas tout le roman judiciaire de la JVM.
you asked
message time: 2026-06-10 21:17:08
on avance, mais le menu ne ressemble pas à grand chose, les caractères sont trop gros. dans les zones de texte, la couleur est foncé dans un arrière plan foncé. pas de noms de chaines. impossible d'arriver aux moutons épingler ou favori. essaie de réduire la taille des zones et du texte. je te laisse voir.
chatgpt response
Tu as raison : l’interface était trop massive, les boutons mangeaient tout l’espace, et les noms de chaînes se faisaient écraser comme une pauvre variable dans un vieux script PowerShell. J’ai préparé une mise à jour UI compacte.
Télécharger le ZIP
📦 Télécharger la mise à jour UI compacte
Corrections incluses
Textes réduits.
Zones de recherche plus petites.
Texte des champs en blanc sur fond sombre.
Catégories plus compactes.
Liste des chaînes plus lisible.
Noms des chaînes visibles.
Suppression des gros boutons dans chaque ligne.
Ajout d’une barre d’action séparée pour :regarder ;
ajouter / retirer favori ;
épingler / désépingler.
Les boutons ne devraient plus écraser le nom des chaînes.
Le focus TV est plus propre.
Installation
Dans PowerShell :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - Backup avant UI compacte" -Recurse
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player-ui-compact-update.zip" -DestinationPath "D:\07-Logiciels\11-IPTV Andoid TV 2" -Force
Puis compile :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Installe sur la box :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Ce qui a changé techniquement
Le ZIP modifie surtout :
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/HomeScreen.kt
J’ai aussi inclus :
README_UPDATE_UI_COMPACT.md
apply-update.ps1
Je n’ai pas compilé dans ton environnement Windows, donc si Gradle refait son numéro de diva, envoie uniquement la partie à partir de :
FAILURE: Build failed
you asked
message time: 2026-06-10 21:26:36
c mieux, mais toujours impossible d'accéder au boutons favorie et epingler.
chatgpt response
Oui, là le problème est clair : les boutons Favori et Épingler sont dans une barre d’action au-dessus de la liste, mais la navigation TV reste coincée dans la liste. Merci Android TV, ce labyrinthe ergonomique payé au focus perdu.
J’ai corrigé ça avec une version où les actions sont directement dans chaque ligne de chaîne.
Télécharger le ZIP corrigé
📦 Télécharger la mise à jour UI Focus Actions
Ce que cette version change
Les boutons ne sont plus seulement en haut.
Chaque chaîne affiche maintenant :Voir
☆ / ★ Favori
Pin / Ép.
Depuis une ligne de chaîne, tu peux aller vers la droite avec la télécommande pour atteindre les actions.
Texte encore un peu réduit.
Badges et boutons plus compacts.
Le nom de la chaîne garde plus d’espace.
La barre du haut devient informative, elle ne bloque plus l’accès aux actions.
Installation
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - Backup avant UI focus actions" -Recurse
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player-ui-focus-actions-update.zip" -DestinationPath "D:\07-Logiciels\11-IPTV Andoid TV 2" -Force
Compile :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Installe sur la box :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Navigation attendue
Dans la liste des chaînes :
OK sur le nom de chaîne = regarder
Droite = accéder à Voir / ★ / Pin
★ = ajouter ou retirer des favoris
Pin = épingler la chaîne
Ép. = chaîne déjà épinglée
Là, les boutons devraient enfin être atteignables sans devoir supplier la télécommande comme un oracle capricieux.
you asked
message time: 2026-06-10 21:40:14
l'affichage sur la chaine de la résolution et nom de la chaine, les indications doivent disparaitre après 3 secondes et quand l'utilisateur clique sur le bouton retour, les infos apparaissent, un deuxième clique sur retour permet de revenir au menu. sinon, supprime les infos : F:favori, P épingler ça ne sert à rien. aussi tu peux ajouter la confirmation de quitter l'application quand on clique sur retour dans le menu. quand on revient au menu à partir d'une chaine, le focus doit être sur le nom de la chaine pas dans les zones de texte.
chatgpt response
J’ai préparé la mise à jour. Elle corrige exactement les points que tu viens de signaler, parce qu’à ce stade on fait de l’ergonomie, pas du mobilier décoratif pour télécommande hostile.
Télécharger le ZIP
📦 Télécharger la mise à jour Player / Retour / Focus
Corrections incluses
Dans le lecteur :
nom de la chaîne + résolution visibles au démarrage ;
disparition automatique après 3 secondes ;
premier clic sur Retour : les infos réapparaissent ;
deuxième clic sur Retour : retour au menu.
Suppression des indications inutiles :
F : favori
P : épingler
Dans le menu :
bouton Retour affiche une confirmation avant de quitter l’application ;
au retour depuis une chaîne, le focus revient sur la ligne de la chaîne sélectionnée, pas dans les champs de recherche.
Installation
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - Backup avant player back focus" -Recurse
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player-player-back-focus-update.zip" -DestinationPath "D:\07-Logiciels\11-IPTV Andoid TV 2" -Force
Puis compile :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Installe :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Fichiers modifiés
app/src/main/java/ma/tkgraph/xtreamtv/MainActivity.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/HomeScreen.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/PlayerScreen.kt
Si Gradle refait son opéra tragique, envoie uniquement le bloc à partir de FAILURE: Build failed.
you asked
message time: 2026-06-10 21:46:04
tu peux ajouter les logo des chainens
you asked
message time: 2026-06-10 21:47:09
ok. maintenant on peux ajouter les logos aux chaines dans l'application. ne part pas sur de la création d'image STP.
chatgpt response
Tu as raison, pas de génération d’image. Là on parle des logos fournis par Xtream via le champ stream_icon, pas d’inventer des logos façon usine à hallucinations graphiques.
Télécharger le ZIP
📦 Télécharger la mise à jour Logos chaînes
Ce que ça ajoute
Affichage du logo de chaque chaîne dans la liste.
Affichage du logo dans l’overlay du lecteur avec le nom de la chaîne et la résolution.
Fallback automatique avec initiales si le logo est absent ou impossible à charger.
Ajout de Coil 3 pour charger les images distantes dans Compose. La doc officielle Coil indique bien l’usage de coil-compose avec AsyncImage, et recommande aussi une dépendance réseau comme coil-network-okhttp pour les images distantes. (coil-kt.github.io)
Fichiers inclus
app/build.gradle.kts
app/src/main/java/ma/tkgraph/xtreamtv/MainActivity.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/HomeScreen.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/PlayerScreen.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/components/ChannelLogo.kt
README_UPDATE_LOGOS.md
apply-update.ps1
Installation
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - Backup avant logos chaines" -Recurse
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player-logos-update.zip" -DestinationPath "D:\07-Logiciels\11-IPTV Andoid TV 2" -Force
Puis compile :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Installe :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Les logos dépendront évidemment de ce que ton fournisseur Xtream renvoie dans stream_icon. Si leur serveur envoie des liens cassés, vides ou moisis, l’app affichera les initiales. L’humanité ne manque jamais une occasion de casser une URL.
you asked
message time: 2026-06-10 21:54:38
on peut programmer maintenant l'epg et le replay
chatgpt response
Oui. J’ai préparé une mise à jour avec EPG + Replay / Catch-up pour les flux Xtream compatibles.
Télécharger le ZIP
📦 Télécharger la mise à jour EPG + Replay
Ce que cette version ajoute
Chargement EPG via :
player_api.php?action=get_short_epg
Affichage dans le menu :
programme en cours ;
programme suivant ;
indication Replay si disponible.
Bouton Replay dans la ligne de la chaîne.
Lecture replay via URL Xtream :
/timeshift/username/password/durée/date/stream_id.ts
Affichage dans le lecteur :
logo ;
nom de chaîne ;
résolution ;
programme en cours ;
badge Replay quand on lit un replay.
Conservation :
favoris ;
épinglage ;
recherche ;
zapping gauche/droite ;
retour vers la même chaîne dans le menu.
Fichiers modifiés / ajoutés
app/build.gradle.kts
app/src/main/java/ma/tkgraph/xtreamtv/MainActivity.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/HomeScreen.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/PlayerScreen.kt
app/src/main/java/ma/tkgraph/xtreamtv/data/model/EpgProgramDto.kt
app/src/main/java/ma/tkgraph/xtreamtv/data/model/EpgShortResponse.kt
app/src/main/java/ma/tkgraph/xtreamtv/data/model/LiveStreamDto.kt
app/src/main/java/ma/tkgraph/xtreamtv/data/model/LiveCategoryDto.kt
app/src/main/java/ma/tkgraph/xtreamtv/data/network/XtreamApi.kt
app/src/main/java/ma/tkgraph/xtreamtv/data/repository/XtreamRepository.kt
app/src/main/java/ma/tkgraph/xtreamtv/util/XtreamUrlBuilder.kt
README_UPDATE_EPG_REPLAY.md
apply-update.ps1
Installation
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - Backup avant EPG replay" -Recurse
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player-epg-replay-update.zip" -DestinationPath "D:\07-Logiciels\11-IPTV Andoid TV 2" -Force
Puis compile :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Installe sur la box :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Important
Le replay dépend totalement du serveur Xtream. Il faut que ton fournisseur renvoie correctement :
tv_archive
has_archive
start
end
epg_listings
Si le serveur ne fournit pas ces données, l’EPG affichera EPG indisponible ou le bouton Replay restera désactivé. Charmant, mais au moins ce sera honnête.
you asked
message time: 2026-06-10 22:04:27
PS D:\07-Logiciels\11-IPTV Andoid TV 2> .\gradlew.bat clean --no-daemon
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.1.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build
BUILD SUCCESSFUL in 7s
1 actionable task: 1 executed
PS D:\07-Logiciels\11-IPTV Andoid TV 2> .\gradlew.bat :app:assembleDebug --no-daemon
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.1.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build
Task :app:compileDebugKotlin FAILED
e: file:///D:/07-Logiciels/11-IPTV%20Andoid%20TV%202/app/src/main/java/ma/tkgraph/xtreamtv/data/model/EpgProgramDto.kt:107:25 Unsupported escape sequence.
e: file:///D:/07-Logiciels/11-IPTV%20Andoid%20TV%202/app/src/main/java/ma/tkgraph/xtreamtv/data/model/EpgProgramDto.kt:107:31 Unsupported escape sequence.
[Incubating] Problems report is available at: file:///D:/07-Logiciels/11-IPTV%20Andoid%20TV%202/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.btapi.BuildToolsApiCompilationWork
Compilation error. See log for more details
Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to generate a Build Scan (Powered by Develocity).
Get more help at https://help.gradle.org.
BUILD FAILED in 17s
29 actionable tasks: 29 executed
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
chatgpt response
Erreur simple : dans Kotlin, \d dans une chaîne classique n’est pas accepté. Il fallait écrire la regex en chaîne brute. Encore une victoire du langage contre la santé mentale.
La ligne fautive était :
Regex("(\d{2}:\d{2})")
Elle est corrigée en :
Regex("""(\d{2}:\d{2})""")
ZIP corrigé
📦 Télécharger la mise à jour EPG + Replay corrigée
Installation
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player-epg-replay-fix1.zip" -DestinationPath "D:\07-Logiciels\11-IPTV Andoid TV 2" -Force
Puis :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Ensuite :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Correction rapide sans ZIP
Tu peux aussi corriger directement avec PowerShell :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
$content = Get-Content ".\app\src\main\java\ma\tkgraph\xtreamtv\data\model\EpgProgramDto.kt" -Raw
$content = $content -replace 'Regex$"\(\\d\{2\}:\\d\{2\}$"\)', 'Regex("""(\d{2}:\d{2})""")'
Set-Content ".\app\src\main\java\ma\tkgraph\xtreamtv\data\model\EpgProgramDto.kt" $content
Le ZIP corrigé est plus propre. Le patch direct existe au cas où Windows décide encore de transformer une tâche simple en rite initiatique.
you asked
message time: 2026-06-10 22:12:09
le replay marche. mais il ne te donne pas le choix de l'emission pour la quelle tu veux voir le replay, il faut pour chaque chaine sélectionnée avoir la liste du programme complet sur les jours qu'on a, l'utilisateur choisi l'émission à revoir.
chatgpt response
Tu as raison : le replay qui lance seulement “l’émission courante”, c’est trop limité. C’est un replay avec amnésie sélective, magnifique concept, mais mauvais produit.
J’ai préparé une mise à jour avec un vrai écran Guide Replay par chaîne.
Télécharger le ZIP
📦 Télécharger la mise à jour Replay Guide complet
Ce que ça ajoute
Le bouton Replay devient Guide.
Quand tu sélectionnes une chaîne, tu peux ouvrir le programme complet disponible.
Les émissions sont groupées par jour.
L’utilisateur choisit directement l’émission à revoir.
Ajout d’une recherche dans les émissions.
Bouton Revoir sur chaque programme disponible.
Retour vers le menu en gardant la chaîne sélectionnée.
Lecture toujours via l’URL Xtream timeshift.
Fichiers modifiés / ajoutés
app/build.gradle.kts
app/src/main/java/ma/tkgraph/xtreamtv/MainActivity.kt
app/src/main/java/ma/tkgraph/xtreamtv/data/model/EpgProgramDto.kt
app/src/main/java/ma/tkgraph/xtreamtv/data/model/EpgFullResponse.kt
app/src/main/java/ma/tkgraph/xtreamtv/data/network/XtreamApi.kt
app/src/main/java/ma/tkgraph/xtreamtv/data/repository/XtreamRepository.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/HomeScreen.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/ReplayGuideScreen.kt
Installation
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - Backup avant replay guide complet" -Recurse
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player-replay-guide-update.zip" -DestinationPath "D:\07-Logiciels\11-IPTV Andoid TV 2" -Force
Puis compile :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Installe sur la box :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Utilisation attendue
Dans la liste des chaînes :
Guide → ouvre le programme complet de la chaîne
Revoir → lance l’émission sélectionnée en replay
Retour → revient au menu
Le guide complet dépend toujours de ce que le serveur Xtream renvoie avec get_simple_data_table. Si le fournisseur ne donne que 1 jour, tu verras 1 jour. S’il donne 7 jours, tu verras 7 jours. L’application affiche la vérité du serveur, même quand cette vérité ressemble à un placard vide.
you asked
message time: 2026-06-10 22:17:39
PS D:\07-Logiciels\11-IPTV Andoid TV 2> adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
Performing Streamed Install
Success
PS D:\07-Logiciels\11-IPTV Andoid TV 2> adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Starting: Intent { cmp=ma.tkgraph.xtreamtv/.MainActivity }
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
PS D:\07-Logiciels\11-IPTV Andoid TV 2> .\gradlew.bat clean --no-daemon
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.1.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build
BUILD SUCCESSFUL in 11s
1 actionable task: 1 executed
<=============> 100% EXECUTING [8s]
PS D:\07-Logiciels\11-IPTV Andoid TV 2> .\gradlew.bat :app:assembleDebug --no-daemon.\gradlew.bat :app:assembleDebug --no-daemon
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.1.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build
FAILURE: Build failed with an exception.
What went wrong:
Problem configuring task :app:assembleDebug from command line.
Unknown command-line option '--no-daemon.\gradlew.bat'.
Try:
Run gradlew help --task :app:assembleDebug to get task usage details.
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to generate a Build Scan (Powered by Develocity).
Get more help at https://help.gradle.org.
BUILD FAILED in 6s
PS D:\07-Logiciels\11-IPTV Andoid TV 2>
chatgpt response
L’erreur vient uniquement d’une commande collée deux fois sur la même ligne :
.\gradlew.bat :app:assembleDebug --no-daemon.\gradlew.bat :app:assembleDebug --no-daemon
Gradle a donc compris :
--no-daemon.\gradlew.bat
comme une option bizarre. Évidemment, il n’a pas apprécié cette poésie PowerShell.
Commande correcte
Relance simplement ceci, une ligne à la fois :
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Attends :
BUILD SUCCESSFUL
Ensuite installe la nouvelle APK :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
Puis lance :
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Bloc complet propre à copier-coller
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Important
Tu as installé une APK avant de recompiler :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
Donc ta box a probablement encore l’ancienne version, pas forcément la version Replay Guide complet. Il faut bien :
1. compiler avec succès
2. installer après compilation
3. lancer l’app
PowerShell n’a pas cassé le projet. Il a juste avalé deux commandes comme un grille-pain qui mange une fourchette.
you asked
message time: 2026-06-10 22:30:47
dans la recherche dès que je clique sur une lettre la zone de texte perd le focus. on peut maintenant ajouter un ecran "guide des programme avec toutes les chaines et l'utilisateur peut choisir l'émission qu'il veut
chatgpt response
Oui. J’ai préparé une mise à jour avec deux corrections importantes :
Correction du focus dans les zones de recherche
la zone ne perd plus le focus après avoir tapé une lettre ;
le focus automatique sur la chaîne ne se déclenche plus pendant la saisie ;
il revient sur la chaîne uniquement quand tu reviens depuis le lecteur ou un guide.
Ajout d’un écran “Guide des programmes” global
bouton Guide TV dans l’accueil ;
liste des catégories ;
liste de toutes les chaînes ;
recherche catégorie ;
recherche chaîne ;
recherche émission ;
programmes complets de la chaîne sélectionnée ;
bouton Direct ;
bouton Revoir pour lancer l’émission en replay quand disponible.
Bref, on se rapproche enfin d’un vrai guide TV, pas d’une liste de chaînes déguisée avec trois boutons tristes.
Télécharger le ZIP
📦 Télécharger la mise à jour Guide TV global
Installation
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - Backup avant guide TV global" -Recurse
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player-program-guide-update.zip" -DestinationPath "D:\07-Logiciels\11-IPTV Andoid TV 2" -Force
Puis compile :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Installe sur la box :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Fichiers modifiés / ajoutés
app/src/main/java/ma/tkgraph/xtreamtv/MainActivity.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/HomeScreen.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/ReplayGuideScreen.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/ProgramGuideScreen.kt
Utilisation attendue
Dans l’accueil :
Guide TV
ouvre le guide global.
Dans le guide :
Catégories à gauche
Chaînes au centre
Programmes à droite
Tu sélectionnes une chaîne, l’app charge son guide complet, puis tu choisis l’émission à revoir. Si le fournisseur Xtream ne renvoie pas le guide complet pour une chaîne, l’écran affichera simplement que rien n’est disponible. Très élégant de la part du serveur, comme toujours.
you asked
message time: 2026-06-10 22:45:55
on peut ajouter les VOD et series.
chatgpt response
Oui, c’est prêt. J’ai ajouté VOD + Séries dans une mise à jour séparée, parce que mélanger ça directement avec le Live sans écran dédié aurait été une belle façon de transformer l’app en placard mal rangé.
Télécharger le ZIP
📦 Télécharger la mise à jour VOD + Séries
Ce que ça ajoute
Bouton VOD dans l’écran Live.
Bouton Séries dans l’écran Live.
Écran catalogue VOD :
catégories VOD ;
recherche catégorie ;
recherche film ;
logos / affiches ;
lecture du film.
Écran catalogue Séries :
catégories séries ;
recherche catégorie ;
recherche série ;
chargement des saisons / épisodes ;
recherche épisode ;
lecture épisode.
Endpoints Xtream ajoutés
get_vod_categories
get_vod_streams
get_series_categories
get_series
get_series_info
Installation
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - Backup avant VOD series" -Recurse
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player-vod-series-update.zip" -DestinationPath "D:\07-Logiciels\11-IPTV Andoid TV 2" -Force
Puis compile :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Installe :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Notes utiles
La lecture VOD utilise :
/movie/username/password/stream_id.extension
La lecture série utilise :
/series/username/password/episode_id.extension
L’extension vient du champ Xtream container_extension. Si le serveur ne donne rien, l’app utilise mp4. Oui, on compense les silences du serveur, comme d’habitude.
you asked
message time: 2026-06-10 22:57:16
on peut ajouter la mise en favorie des VOD et series
chatgpt response
Oui, c’est prêt. J’ai ajouté la mise en favori des VOD et des séries. On évite ainsi le grand sport humain qui consiste à rechercher le même film 12 fois parce qu’on a refusé d’ajouter une étoile.
Télécharger le ZIP
📦 Télécharger la mise à jour Favoris VOD + Séries
Ce que ça ajoute
Bouton ☆ / ★ sur chaque film VOD.
Bouton ☆ / ★ sur chaque série.
Catégorie automatique ★ Favoris dans le catalogue VOD.
Catégorie automatique ★ Favoris dans le catalogue Séries.
Sauvegarde persistante des favoris.
Badge Favori dans les lignes VOD / Séries.
Badge Favori dans l’overlay du lecteur quand le film ou la série est marqué favori.
Installation
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - Backup avant favoris VOD series" -Recurse
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player-vod-series-favorites-update.zip" -DestinationPath "D:\07-Logiciels\11-IPTV Andoid TV 2" -Force
Puis compile :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Installe :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Fichiers modifiés
app/src/main/java/ma/tkgraph/xtreamtv/data/storage/ConfigStorage.kt
app/src/main/java/ma/tkgraph/xtreamtv/MainActivity.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/VodScreen.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/SeriesScreen.kt
Si Gradle se remet à faire son théâtre, envoie uniquement le bloc à partir de FAILURE: Build failed.
you asked
message time: 2026-06-10 23:04:43
on ne vois pas les noms des episodes
chatgpt response
Oui, on voit bien le problème : le panneau épisodes affiche juste des petits points, donc soit le serveur renvoie le titre dans un autre champ que title, soit il renvoie un titre vide/. et l’interface n’a pas de vrai fallback. Encore un serveur Xtream qui communique comme une imprimante en fin de vie.
J’ai préparé une correction.
Télécharger le ZIP
📦 Télécharger la correction noms des épisodes
Ce que ça corrige
Les titres d’épisodes utilisent maintenant plusieurs champs possibles :
title
name
episode_name
Si le serveur renvoie un titre vide, ., - ou ..., l’app affiche un nom lisible :
Épisode 1 • Nom de la série
Épisode 2 • Nom de la série
Le bouton Lire est réduit pour laisser plus de place au titre.
Le titre d’épisode peut s’afficher sur 2 lignes.
Les métadonnées affichent :saison ;
extension ;
durée si disponible ;
date si disponible ;
ID épisode.
Installation
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - Backup avant noms episodes series" -Recurse
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player-series-episode-names-update.zip" -DestinationPath "D:\07-Logiciels\11-IPTV Andoid TV 2" -Force
Puis compile :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Installe :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Fichiers modifiés
app/src/main/java/ma/tkgraph/xtreamtv/data/model/SeriesInfoResponse.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/SeriesScreen.kt
Après ça, même si ton fournisseur renvoie des titres d’épisodes façon “.”, l’interface affichera quelque chose de compréhensible. Minimalement civilisé, donc déjà un progrès.
you asked
message time: 2026-06-10 23:14:40
on peut trier les catégories par les catgorie en français puis l'arabe pui les autres
chatgpt response
Oui. J’ai préparé une mise à jour pour trier les catégories dans cet ordre :
1. Catégories françaises
2. Catégories arabes
3. Autres catégories
Les catégories internes restent en haut :
Toutes les chaînes / Toutes les VOD / Toutes les séries
Favoris
Parce que si “Favoris” part se perdre entre “Albania” et “Arabic Kids”, autant abandonner l’interface à une télécommande possédée.
Télécharger le ZIP
📦 Télécharger la mise à jour tri des catégories
Écrans concernés
Le tri est appliqué sur :
Live TV
Guide TV global
VOD
Séries
Fichiers modifiés / ajoutés
app/src/main/java/ma/tkgraph/xtreamtv/util/CategorySortUtils.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/HomeScreen.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/ProgramGuideScreen.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/VodScreen.kt
app/src/main/java/ma/tkgraph/xtreamtv/ui/screens/SeriesScreen.kt
Installation
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - Backup avant tri categories" -Recurse
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player-category-sort-update.zip" -DestinationPath "D:\07-Logiciels\11-IPTV Andoid TV 2" -Force
Puis compile :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Installe :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Le tri reconnaît notamment les catégories avec FR, FRANCE, FRENCH, puis AR, ARABIC, ARABE, MAROC, MOROCCO, texte arabe, etc.
you asked
message time: 2026-06-10 23:28:42
au démarrage il y a un ecran blanc de chargement, tu peux le modifier avec l'ecran avec l'image en jointure
you asked
message time: 2026-06-10 23:29:46
je ne demande pas la modification de l'image. je que dans le programme : au démarrage il y a un ecran blanc de chargement, tu peux le modifier avec l'ecran avec l'image en jointure
chatgpt response
Oui, compris : on ne touche pas à l’image, on l’intègre dans l’application comme écran de démarrage. J’ai préparé le ZIP qui remplace l’écran blanc de chargement par ton visuel iMedia TV+.
Télécharger le ZIP
📦 Télécharger la mise à jour Splash iMedia TV+
Ce que ça modifie
Ajout de ton image dans :
app/src/main/res/drawable-nodpi/imedia_tv_background.png
Ajout d’un fond de lancement Android :
app/src/main/res/drawable/launch_background.xml
Modification du thème Android pour éviter l’écran blanc avant le chargement Compose :
app/src/main/res/values/themes.xml
Modification de l’écran LoadingScreen dans :
app/src/main/java/ma/tkgraph/xtreamtv/MainActivity.kt
Résultat attendu :
au démarrage, l’image iMedia TV+ apparaît ;
pendant la connexion automatique, le message de chargement s’affiche en bas ;
plus d’écran blanc froid façon salle d’attente administrative.
Installation
cd "D:\07-Logiciels\11-IPTV Andoid TV 2"
Copy-Item "D:\07-Logiciels\11-IPTV Andoid TV 2" "D:\07-Logiciels\11-IPTV Andoid TV 2 - Backup avant splash iMedia" -Recurse
Expand-Archive -Path "$env:USERPROFILE\Downloads\xtream-google-tv-player-splash-background-update.zip" -DestinationPath "D:\07-Logiciels\11-IPTV Andoid TV 2" -Force
Puis compile :
.\gradlew.bat clean --no-daemon
.\gradlew.bat :app:assembleDebug --no-daemon
Installe :
adb install -r ".\app\build\outputs\apk\debug\app-debug.apk"
adb shell am start -n ma.tkgraph.xtreamtv/.MainActivity
Le ZIP contient aussi un README_UPDATE_SPLASH_BACKGROUND.md et un apply-update.ps1, parce qu’apparemment même les écrans de chargement ont maintenant besoin d’un dossier de cérémonie.