摘要: 一.修改本机蓝牙设备的可见性二.扫描周围可用的蓝牙设备一. 清单文件AdroidManifest.xml: 二.布局文件:main.xml: 三. MainActivity:import android.app.Activity;import android.bluetooth.BluetoothAdapter;import android.bluetooth.BluetoothDevice;import android.content.BroadcastReceiver;import android.content.Context;import android.... 阅读全文
posted @ 2014-03-19 01:34 lhj588 阅读(1128) 评论(0) 推荐(0) 编辑
摘要: 一.什么是蓝牙(Bluetooth)?1.1BuleTooth是目前使用最广泛的无线通信协议1.2主要针对短距离设备通讯(10m)1.3常用于连接耳机,鼠标和移动通讯设备等.二.与蓝牙相关的API2.1BluetoothAdapter:代表了本地的蓝牙适配器2.2BluetoothDevice代表了一个远程的Bluetooth设备三.扫描已经配对的蓝牙设备(1)注:必须部署在真实手机上,模拟器无法实现首先需要在AndroidManifest.xml声明蓝牙权限配对蓝牙需要手动操作:1.打开设置-->无线网络-->蓝牙勾选开启2.打开蓝牙设置扫描周围已经开启的蓝牙设备(可以与自己的笔 阅读全文
posted @ 2014-03-19 01:31 lhj588 阅读(2367) 评论(0) 推荐(0) 编辑
摘要: 一、 Http/Net1. http 通讯协议和android中相关API介绍2、发送http请求实例【GET,POST】论坛参考文献:http://www.eoeandroid.com/viewthread.php?tid=242&highlight=http求示3、如何在android上发送多媒体数据【图片,音频,压缩包等】4、socket相关数据传输论坛参考文献:http://www.eoeandroid.com/viewthread.php?tid=359&highlight=net5、http其他相关技巧二、SD卡1、SD卡概述及深层次介绍2、在模拟器如何创建、挂载、 阅读全文
posted @ 2014-03-19 01:00 lhj588 阅读(219) 评论(0) 推荐(0) 编辑
摘要: // 初始化socketsocket = new Socket(InetAddress.getByName(sip), sport);InputStream sin = socket.getInputStream();OutputStream ops = socket.getOutputStream();// 发送DataOutputStream dos=new DataOutputStream(ops);dos.write(sendbyte);// 接收DataInputStream dis = new DataInputStream(sin);byte[] onerec = new byt 阅读全文
posted @ 2014-03-19 00:59 lhj588 阅读(468) 评论(0) 推荐(0) 编辑