B4J Question B4J equivalent code

jcesar

Active Member
Licensed User
Longtime User
Hi this java code connects to a online radio and use a player to play the stream.

Anyone knows what is the b4j code to do this ?

B4X:
 OkHttpClient client = new OkHttpClient();
        Request request = new Request.Builder()
        .url("http://uplink.duplexfx.com:8800/")
        .build();

        Response response = client.newCall(request).execute();
        InputStream stream = response.body().byteStream();
 
Last edited:

PatrikCavina

Active Member
Licensed User
Longtime User
B4X:
    Dim job As HttpJob
    job.Initialize("", Me)
    job.Download("http://uplink.duplexfx.com:8800/")
    Wait For (job) JobDone (job As HttpJob)
    Dim in As InputStream = job.GetInputStream
    job.Release
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…