Error error "1101 unable to get a response with the specified url" in Radio app after few mins of playing

I am building a very basic readio app (1 station) but after few mins of playing I got the error “error 1101 unable to get a response with the specified url” , the .apk file was uoloaded in Gdrive. I used another site to make the same app and is running just fine, but I do not know where they host the .apk and they migh push ads that I dont want… for that reason I came here. Do I need to host my .apk file somewhere else?
Gracias.
MAx

1 Like

Try searching the forum, lots of posts about this:

https://community.appinventor.mit.edu/search?q=radio

(It should have nothing to do with where you host your apk file)

2 Likes

well the “the power saver on my phone …” solution that worker to others is not helping in my case,Capture

my apk file hosted in Gdrive only plays for about 6-10 mins and then gives me the error message. What is wrong?

Does anyone knows what is wrong?, I even made it lighter and much more simple and same problem, it desconects after less than 10 mins.

Just in case it has nothing to do with Android cutting off the app thinking the device goes into sleep mode or battery saving mode because I have another app built by another service that uses the same radio URL and that keeps playing without problems.

And that is…?

That was appcreator24.com, but look what I just found…maybe this is the reason of problem:

You need a Foreground service to keep the WiFi / Network connection alive and don't fall into Doze mode.

Try this APK and test it with / without Foreground service:

  • don't charge the device while testing
  • start the app, click play and press the power button to put the device in the background (screen off).
  • without Foreground service the sound will stop after ~ 4-6 min
  • with Foreground service the sound (looped) will play forever ... :wink:

Note:
A foreground service is not required for every device, but on some devices (such as Samsung Galaxy Note 8 or Galaxy S8, Android 9, ...) WiFi, clock etc. are shut down by Doze.

i AM trying your solution to radio stream, excellent work. I am truly a fan now, all Hail Anke...

Will this work for a audio stream also? Sure would be nice on how you did it. Not asking for blocks just how it was accomplished and with what software?

So I add the foreground in designer in MIT2 and make it loop?
I am aware you know the answer somewhat, but I need more help.

How to enable foreground service like your this test app .?

https://ullisroboterseite.de/android-AI2-KeepAlive-en.html

1 Like