通过Android的WiFi连接 [英] WiFi connection via android

查看:285
本文介绍了通过Android的WiFi连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要就如何通过wifi处理android上的数据的教程。铁,我需要发送一些信息给PC和接受其他一些消息。我应该如何建立连接?我应该怎么做才能够传输数据,以及如何?

I need a tutorial on how to process data on android via wifi. F.e., I need to send some message to PC and receive some other message. How should I establish the connection? What should I do to be able to transfer data and how?

抱歉哑问题,但我不能找到很好的手册。我会感激的详细手册越好,或用于etablishing wifi连接和发送OME简单的例子/接收简单mesages。

Sorry for the dummy question, but I can't find good manual. I'll be grateful for as detailed manual as possible, or for ome simple example on etablishing wifi connection and sending/receiving simple mesages.

推荐答案

您不必使用任何API的连接上WIFI其唯一的要求,如果你想手动启动装置中的无线网络,包括

只要确保你的设备具有WiFi支持,并做好简单的TCP / IP套接字应用程序。有了这个,你可以与你的系统和设备,并使用系统的公共IP通信,就可以与您的系统。

Just make sure your device has a WiFi enable, and make a simple TCP/IP Socket application. With this you can communication with your system and device, And Use System's public IP to connect with your system.

另外不要忘了给允许网络在清单文件。

Also don't forget to give permission Internet in your manifest file..

下面一些不错的链接套接字编程的机器人。

Here some nice links for Socket Programing in Android..

<一个href="http://www.helloandroid.com/tutorials/simple-connection-example-part-ii-tcp-communication">Simple连接例如第二部分 - TCP通信

网络与Android

简易通信使用的java.net.Socket

<一个href="http://www.anddev.org/tcp_sockets-t276.html">http://www.anddev.org/tcp_sockets-t276.html

<一个href="http://www.anddev.org/socket_programming-t325-s30.html">http://www.anddev.org/socket_programming-t325-s30.html

修改:: Android的无线网络的例子,

: Android WiFi examples,

扫描无线网络

使用WiFi API

SO问题<一href="http://stackoverflow.com/questions/5983214/android-is-there-any-way-to-get-notified-when-known-wifi-networks-get-in-out-of">Android:有没有办法得到通知时,已知的WiFi网络获取输入/输出范围?

这篇关于通过Android的WiFi连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆