-
If not connected put a Notifier in the
Net.OnDisconnectevent: "Connection lost ... please wait..." and try to play the audio stream again in theNet.OnConnectevent.
See here: Net : Get some information about network
-
But since Android 6 Google introduced Doze mode. This causes all possible functions to be shut down / throttled (WiFi / LTE etc.) after some time (min / sec). This inevitably leads to disconnections and the audio stream stops. To prevent this, a Foreground servive must be used.
Search the forum for radio / streaming app.
