Send & Receive data from Android to PC (TCP Sockets) in Android Studio PART 1

Android with Haroon · 153K views · 2017 · 10:07

Open on YouTube

Software (other)Networking & internet infrastructuretutorialdated

Why Stack Overflow recommends it

Stack Overflow users mention it as the tutorial they followed when building Android-to-PC socket clients, usually while asking why their copied code fails to connect or send data.

Recommended by 1 people across 1 different months, 2018 to 2019.

What it is

A 10-minute Android Studio tutorial, part 1 of a series on TCP sockets, in which the presenter builds a simple chat-style app that sends messages from an Android device to a Java server on a PC. Part 2 covers sending data back from the PC to the Android client.

What people said

Recommends user10882820 · 2019-01 · Stack Overflow · on “Data transfer between android app on device to PC netbeans java server”

Good day, I am developing an android app to send textView value to a server made in Java netbeans, I followed a tutorial on YouTube [ [this video] ] however when I run the server first it does not send the data through. I am connected to the same Wi-Fi network as well. EDIT: When I use the code System.out.println(ss.getInetAddress()); in my server class in Java, I get 0.0.0.0 as the ip address but I am connected to a wifi network. Here is my AsyncTask class (written in android studio): public class SendData extends AsyncTask<String, Void, Void> { Socket s; DataOutputStream dos; PrintWriter pw; @Override protected Void doInBackground(String... voids) { String number = voids[0]; try{ s = new Socket

Cites user5427986 · 2018-01 · Stack Overflow · on “Simple TCP client?”

I'm trying to program a simple android TCP client app to send data to a esp8266 server. I have tested the esp server with roboremo and it works. I followed a yt tutorial ( [this video] ), i had to change some syntax errors, i used the android studio recommendations. I am monitoring what the esp receives with simulink (visa loopback). Roboremo works fine, my app doesn't send anything. I checked the IP and port multiple times. MainActivity class code: package com.example.tinemasilo.tcptest; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; public class MainActivity extends AppCompatActivity { EditText e1; @Override p

Cites Lukas Grabowski · 2019-10 · Stack Overflow · on “C# Server, Android Java Client - Connection issues”

I used a tutorial (" [this video] ") to create the android app. I didn't come up with the code myself. As already mentioned, I'm not very experienced with java, therefore, I have a hard time explaining how the code works exactly and how to use every command. Hence, why I didn't answer the serversocket question. I hope you understand. If you have a better solution, I'd be pleased to hear it.