M MetalOS Member Licensed User Longtime User Jan 22, 2025 #1 Hello, can someone confirm if it is possible to play a Shoutcast stream with the ExoPlayer library? And if so how to implement it because I encounter this error: Error: com.google.android.exoplayer2.upstream.HttpDataSource$CleartextNotPermittedException: Cleartext HTTP traffic not permitted. See https://exoplayer.dev/issues/cleartext-not-permitted Click to expand... Tanks
Hello, can someone confirm if it is possible to play a Shoutcast stream with the ExoPlayer library? And if so how to implement it because I encounter this error: Error: com.google.android.exoplayer2.upstream.HttpDataSource$CleartextNotPermittedException: Cleartext HTTP traffic not permitted. See https://exoplayer.dev/issues/cleartext-not-permitted Click to expand... Tanks
drgottjr Expert Licensed User Longtime User Jan 22, 2025 #2 the link you posted tells you exactly what to do. do it. assuming you're not publishing the app on play, a simple line added to the manifest should take care of the problem. CreateResourceFromFile(Macro, Core.NetworkClearText) Upvote 0
the link you posted tells you exactly what to do. do it. assuming you're not publishing the app on play, a simple line added to the manifest should take care of the problem. CreateResourceFromFile(Macro, Core.NetworkClearText)
M MetalOS Member Licensed User Longtime User Jan 22, 2025 #3 It actually works. I'm really a drag. Tanks Upvote 0
M MetalOS Member Licensed User Longtime User Jan 22, 2025 #4 The biggest problem I encounter is if the screen goes to sleep the flow is cut and the application crashes. I tried the Wak lock but nothing worked. I am attaching my example. Attachments testExoPlayer.zip testExoPlayer.zip 12.8 KB · Views: 291 Upvote 0
The biggest problem I encounter is if the screen goes to sleep the flow is cut and the application crashes. I tried the Wak lock but nothing worked. I am attaching my example.
drgottjr Expert Licensed User Longtime User Jan 22, 2025 #5 MetalOS said: It actually works. I'm really a drag. Tanks Click to expand... yes, bad MetalOS. bad. i haven't tried to run your probject yet, but running exoplayer in a service and wake lock usually works. i watch tv (and listen to tv when driving) and listen to the radio with exoplayer. the screen is dark a lot of the time... Upvote 0
MetalOS said: It actually works. I'm really a drag. Tanks Click to expand... yes, bad MetalOS. bad. i haven't tried to run your probject yet, but running exoplayer in a service and wake lock usually works. i watch tv (and listen to tv when driving) and listen to the radio with exoplayer. the screen is dark a lot of the time...
M MetalOS Member Licensed User Longtime User Jan 22, 2025 #6 Sorry for my English (google). I don't know how to do the service. Upvote 0
drgottjr Expert Licensed User Longtime User Jan 22, 2025 #7 i would handle it something like the attached. see if you can figure out what it's doing. i've commented out the wakelock, but you may have to uncomment it. Attachments exo.zip exo.zip 10.5 KB · Views: 303 Upvote 0
i would handle it something like the attached. see if you can figure out what it's doing. i've commented out the wakelock, but you may have to uncomment it.
M MetalOS Member Licensed User Longtime User Jan 22, 2025 #8 Great I'll try that when I'm done with my work. Thanks. Upvote 0
M MetalOS Member Licensed User Longtime User Jan 23, 2025 #9 It works really well, thank you very much. I understand the use of the service a little better. THANKS. Upvote 0
It works really well, thank you very much. I understand the use of the service a little better. THANKS.