Home » Source Code » [Android] phone data to a computer (WiFi)

[Android] phone data to a computer (WiFi)

jaychnou
2013-10-01 02:29:37
The author
View(s):
Download(s): 13
Point (s): 4 
Category Category:
AndroidAndroid JavaJava

Description

How to transfer  data from mobile phone to a computer via WIFI?
 
We can use the ServerSocket (Server side) and socket (Client side) to implement as an example, 
Selected a photograph sent from the phone to the computer, 
Here it must be noted, Server and client needs in the same URL. 


Computer side (Server): 
First customize a port (this is set to 1111), then build a ServcerSocket, 
Then call accept () method, this method would have been to wait until the client side even come in, 
The program will execute the next line. 

Side of the build method, I use eclipse, direct NEW-> Java project, after the program comes in,
Press RUN (Ctrl + F11) to perform, and then wait for the Android side even come.

Android terminal (Client):
Here I designed, the program started, we chose a photograph sent to the computer side,
Is divided into two stages:
When the first phase, new one socket, and then into the Server-side IP address and Port number,
The second stage, after the first picture is read, in the presence of buffer,
Then use outputstream output to the Server side.

Finally, because we used network transmission, So remember add INTERNET permission to xml.
AndroidManifest.xml
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
MainActivity.java1.74 kB01-10-13 14:18
AndroidManifest.xml964.00 B01-10-13 14:18
DesktopServerTCP.java1.43 kB01-10-13 14:17
...
Sponsored links

Comments

(Add your comment, get 0.1 Point)
Minimum:15 words, Maximum:160 words
Wing1022890
2015-02-15

Can you give more code for previewing

abegaz astaatke
2016-04-07

it is nessary to me thes ecode plese help for me

abegaz astaatke
2016-04-07

the system to take the wifi to laptop to moble is neccssary

zy512
2017-03-08

不错的资源,学习一下,谢谢分享【需要的朋友可以看我用户名联系我】

raoumerfarooq444@codeforge.com
2017-08-12

Its cide is very compulsory for me . But i have not point please help me hiw i can get this code

  • 1
  • Page 1
  • Total 1

[Android] phone data to a computer (WiFi) (2.08 kB)

Need 4 Point(s)
Your Point (s)

Your Point isn't enough.

Get 22 Point immediately by PayPal

Point will be added to your account automatically after the transaction.

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more Points

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D