摘要:
到公司第一天,老大说要个Android Native的app。在局域网Wifi下,phone端可以互相发送信息实现聊天。My God,我可从来没有弄过这个啊。没办法,现学呗。首先想到Socket编程,但是得有Server端。但是手机应用啊。不能在PC再给开个Server吧。所以两个Phone端就互为Client,互为Server端。大方向确定后,先用PC机当server来通信,毕竟网上这方面文章多,继尔建个新的Android App 当Server端,怎么在模拟器中模拟两个手机端口的通信。简单说就是用PC redirect 到emulator端口。.参照我的另一篇文章。http://www.c 阅读全文
摘要:
PC电脑和Android模拟器系统之间通信1、运行模拟器2、打开window命令行,执行:1telnetlocalhost55545554是模拟器的端口(位于Android模拟器窗口标题栏),执行之后会进入androidconsole3、在console下执行:格式:rediradd<udp/tcp>:<pc端口>:<模拟器端口>例如:rediraddudp:8192:8191rediraddtcp:8192:8191执行此命令之后,会把PC 8192 端口接收到的tcp/udp数据转到模拟器的8191端口。android应用中如果建立socket host 阅读全文
摘要:
At first,If you want to develope a androidapplication,you must have its SDK,short forSoftware Development Kit, 即软件开发工具包.It is the same with Java .JDK.SDK Manager:You know that there are many versions of android platform ,from 1.5 to 4.1 now.So for differentsystems ,we may support on different versio 阅读全文
摘要:
The Android SDK is composed of modular packages that you can download separately using the Android SDK Manager. For example, when the SDK Tools are updated or a new version of the Android platform is released, you can use the SDK Manager to quickly download them to your environment. Simply follow th 阅读全文
摘要:
SDK Tools, Revision 20(June 2012)Dependencies:Android SDK Platform-tools revision 12 or later.If you are developing in Eclipse with ADT, note that the SDK Tools r20 is designed for use with ADT 20.0.0 and later. If you haven't already, we highly recommend updating yourADT Pluginto 20.0.0.If you 阅读全文
摘要:
Download the ADT Plugindownload the ADT zip file to your local machine and manually install it:Download the current ADT Plugin zip file from the table below (do not unpack it).NamePackageSizeMD5 ChecksumADT 20.0.0ADT-20.0.0.zip12387628 bytesea0fc934af3b6b89097f0146c7822ed0Start Eclipse, then selectH 阅读全文
摘要:
什么是JSONPJSONP即JSON with Padding。由于同源策略的限制,XmlHttpRequest只允许请求当前源(域名、协议、端口)的资源。如果要进行跨域请求,我们可以通过使用 html的script标记来进行跨域请求,并在响应中返回要执行的script代码,其中可以直接使用JSON传递javascript对象。这种跨域的通讯方式称为JSONP。对于上面的解释,我们可以简单这样理解:JSONP就是可以通过JavaScript文件进行跨域通讯的方式,例如:现在各大网站风靡的搜索提示,搜狗云输入法注意:JSONP服务器端代码需要充分做好安全措施。最简单的JSONPvar JSONP 阅读全文