In my application, I want to send some data(say, "Hello") from my app to my PC over WIFI network. In PC, a service will listen to that data. But i don't have any idea of sending data over WIFI. I didn't get any proper references too. can someone help me. Thanks in advance.
send data from phone to PC via WIFI
1.6k Views Asked by Pradeep CR AtThere are 2 best solutions below
AudioBubble
On
This depends on what you want the service on the PC to do with the received data, really. For all I know, you might find some off-the-shelf software that can help you set up this service. However, as others mention here, http is definetely the easiest way to do this. If you cannot find any existing software for the "listening pc", you'll need to write a program that listens at a predetermined port for http traffic (I wouldn't use the standard http port, 80, since you might run into conflicts with existing http software). You can do this quite easily in java, using Serversocket and/or Socket (as Tobias Rizau mentions above). Personally, I'd write a C/C++ program, since imo. that makes a better service, but that's absolutely not necessary (especially if you only know Java).
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in SOCKETS
- Drawing with ncurses, sockets and fork
- UDP sockets in C not working
- How can I send multiple objects over one socket in java?
- psuedo TCP multicast with os.dup2() in python?
- My get request for http is very slow
- Nodejs connect mysql socket to another host?
- HttpRequestContext vs HttpContext
- Spring based client server communication without network
- Java does not accept 2 methods with same name
- Retrieve Data From EOC(Eithernet Over coxial) device
- Ping a server without freezing the Thread
- C sockets: Exit client after all data is received
- What is the best way to send XML converted to a byte array over TCP, then translate the response back to readable XML?
- C# Winform to Connect to Device Using IP
- Java Restart a Socket
Related Questions in WIFI
- Android check WIFI status (disconnected or user changed WIFI)
- Can i send data through wifi while on another connection
- Find all/particular SSID
- Async HTTP Request and Arduino
- Using scapy with wifi
- Detecting wirless network status change in .NET
- Wifi ESP8266 between to micros
- Data Transfer between iOS and PC over WiFi
- How can i programatically switch my wifi to wifi Printer for printing in iOS
- What is the easiest way to check the network speed in android on both mobile and wifi connection?
- Accept any Wi-Fi password on OpenWRT (hostap)
- OS X Server kills WiFi connection
- Connect multiple devices in GoPro network
- Transfer Data over wifi in android between server and clients
- SCAPY PYTHON - Get 802.11 DS Status
Related Questions in ANDROID-WIFI
- issues with one to many mobile device file transfer in android using wifi direct
- Sending and recieving data over wifi connection in android programatically
- HTTPS connection on wi-fi enabled Android Wear without phone tethering
- Connect multiple devices in GoPro network
- WiFi direct Ip address
- Get security type from configured network?
- Uniquely identify a particular wifi source using Android devices
- wifi scan is not performed when calling wifi.startScan() outside the MainActivity
- Where are methods responsible for showing WiFi networks' options?
- QR Code Wi-Fi Static IP
- NetworkInfo state for WIFI returns disconnected when no internet connection available android 5.0
- Sending traffic in android app via particular connection
- Android app to receive data sent by ESP-01 8266
- Android Wifi Receiver broadcast late response
- send text from one android device to another through wifi
Related Questions in ANDROID-WIRELESS
- issues with one to many mobile device file transfer in android using wifi direct
- Is it possible to switch APN programatically in android?
- "no route to host" on device on getOutputStream() - connected wirelessly
- How to list all connected nodes in android application (using WIFI)?
- Access one android device to another android device
- App crashes when wifi is out of range
- Android Wireless Adaptor Support in Emulator
- Are there means to read wireless related low level data in android?
- How to use scrcpy to run mutiple emulated phyicall devices wirelessly?
- How to get wifi hotspot state
- How to connect to a wireless network in android?
- send data from phone to PC via WIFI
- Is it possible to scan for all the WiFi enabled android devices, not just hotspots?
- Google Pixel 7 losing debugging connection in wireless debugging, also "Allow USB debugging" keeps on popping up cable connection
- Location request times out when alarm wakes device; do I need to reconnect wireless networks manually?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
What you need is a propper protocol which both, your server and your phone can easily deal with.
If you don't send sensitive data, I think easiest would be HTTP