- 博客(36)
- 资源 (2)
- 收藏
- 关注
转载 APP更新
public class UpdateManger {// 应用程序Contextprivate Context mContext;// 提示消息private String updateMsg = "有最新的软件包,请下载!";// 下载安装包的网络路径private String apkUrl ="http://softfile.3g.qq.
2016-04-29 12:01:19 990
转载 Android实现 UDP
2. [代码]核心功能代码 ?1234567891011121314151617181920212223242526272829
2016-04-29 11:43:56 751
转载 Android中service
1、Service的种类 按运行地点分类:类别区别 优点缺点 应用本地服务(Local)该服务依附在主进程上, 服务依附在主进程上而不是独立的进程,这样在一定程度上节约了资源,另外Local服务因为是在同一进程因此不需要IPC,也不需要AIDL。相应bindService会方便很多。 主
2016-04-29 10:53:36 301
原创 Android蓝牙4.0之GATT
蓝牙4.0——Android BLE开发官方文档翻译安卓4.3(API 18)为BLE的核心功能提供平台支持和API,App可以利用它来发现设备、查询服务和读写特性。相比传统的蓝牙,BLE更显著的特点是低功耗。这一优点使android App可以与具有低功耗要求的BLE设备通信,如近距离传感器、心脏速率监视器、健身设备等。关键术语和概念Generic Attri
2016-04-29 10:20:04 7643 2
原创 Android中修改toast的显示位置
在xml中设置onclick属性值,内部写入一个String数据,在class文件中使用此String作为方法名,即可实现其跳转public class ToastActivity extends BaseActivity { @Override protected void onCreate(Bundle savedInstanceState) { s
2016-04-28 17:31:03 7844
原创 Android蓝牙4.0API-类-BluetoothHealth
BluetoothHealth is a proxy object for controlling the Bluetooth Service via IPC.How to connect to a health device which is acting in the source role.Use getProfileProxy(Context, BluetoothP
2016-04-28 16:46:17 772
转载 Android蓝牙4.0API部分内容
Android平台包含了对蓝牙网络协议栈的支持,它允许一个蓝牙设备跟其他的蓝牙设备进行无线的数据交换。应用程序通过Android蓝牙API提供访问蓝牙的功能。这些API会把应用程序无线连接到其他的蓝牙设备上,具有点到点和多点无线特征。使用蓝牙API,Android应用程序能够执行以下功能:1. 扫描其他蓝牙设备2. 查询本地已经配对的蓝牙适配器3. 建立RFCOMM通道4. 通
2016-04-28 16:25:16 762
转载 Android蓝牙4.0的使用
首先发一下官方的demo,有兴趣的可以过去看看:http://developer.android.com/guide/topics/connectivity/bluetooth-le.html。android系统4.3以上,手机支持蓝牙4.0,具有搜索,配对,连接,发现服务及特征值,断开连接等功能,下载地址:http://download.csdn.net/detail/lqw770737185/
2016-04-28 11:39:02 566
原创 Android蓝牙4.0API-类-BluetoothGattCharacteristic
Represents a Bluetooth GATT CharacteristicA GATT characteristic is a basic data element 元素used to construct构建 a GATT service, BluetoothGattService. The characteristic contains a value as well as a
2016-04-28 11:13:15 10838 1
原创 Android蓝牙4.0API-类-BluetoothGattCallback
This abstract class is used to implement BluetoothGatt callbacks.公有的方法void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic)Callback triggered引起 as a resu
2016-04-28 11:02:26 2195
原创 Android蓝牙4.0API-类-BluetoothGatt
Public API for the Bluetooth GATT Profile. 适用于GATT协议,实现控制等This class provides Bluetooth GATT functionality to enable communication with Bluetooth Smart or Smart Ready devices.To connect to
2016-04-28 10:51:58 2630
原创 Android蓝牙4.0API内容-接口-BluetoothProfile
Public APIs for the Bluetooth Profiles配置文件. Clients should call getProfileProxy(Context, BluetoothProfile.ServiceListener, int), to get the Profile Proxy代理. Each public profile implements this int
2016-04-28 10:15:23 1713
原创 Android蓝牙4.0API接口之BluetoothAdapter.LeScanCallback
android.bluetoothProvides classes that manage Bluetooth functionality, such as scanning for devices, connecting with devices, and managing data transfer between devices. The Bluetooth API supp
2016-04-28 09:41:57 7369
转载 Android蓝牙4.0
Android平台包含了对蓝牙网络协议栈的支持,它允许一个蓝牙设备跟其他的蓝牙设备进行无线的数据交换。应用程序通过Android蓝牙API提供访问蓝牙的功能。这些API会把应用程序无线连接到其他的蓝牙设备上,具有点到点和多点无线特征。使用蓝牙API,Android应用程序能够执行以下功能:1. 扫描其他蓝牙设备2. 查询本地已经配对的蓝牙适配器3. 建立RFCOMM通道4. 通
2016-04-27 14:15:42 644
转载 关于Android 4.0开发智能家居
http://www.jb51.net/article/80756.htm1.先介绍一下关于蓝牙4.0中的一些名词吧: (1)、GATT(Gneric Attibute Profile)通过ble连接,读写属性类小数据Profile通用的规范。现在所有的ble应用Profile 都是基于GATT(2)、ATT(Attribute Protocal)GATT是
2016-04-27 10:27:07 729
转载 关于dp转px
在xml布局文件中,我们既可以设置px,也可以设置dp(或者dip)。一般情况下,我们都会选择使用dp,这样可以保证不同屏幕分辨率的机器上布局一致。但是在代码中,如何处理呢?很多控件的方法中都只提供了设置px的方法,例如setPadding,并没有提供设置dp的方法。这个时候,如果需要设置dp的话,就要将dp转换成px了。以下是一个应用类,方便进行px和dp之间的转换。
2016-04-20 11:43:53 331
原创 等待多少秒后执行操作
Thread the=new Thread(){public void run() {Message mess=new Message();mess.what=1;hand.sendMessage(mess);};};hand.postDelayed(the, 4000);
2016-04-19 15:24:29 1650
转载 除去listview的点击效果
方法一,在控件被初始化的时候设置gridView.setSelector(new ColorDrawable(Color.TRANSPARENT));listView.setSelector(new ColorDrawable(Color.TRANSPARENT));方法二,在布局文件中设置listSelector属性 <GridView android:li
2016-04-19 14:43:30 191
转载 listview嵌套问题
publicstatic void setListViewHeightBasedOnChildren(ListView listView) {//获取ListView对应的AdapterListAdapter listAdapter = listView.getAdapter(); if(listAdapter == null) {/
2016-04-19 14:31:08 187
原创 关于surfaceview的使用
http://blog.csdn.net/listening_music/article/details/6860786
2016-04-19 09:07:24 177
转载 画图轻量级
http://www.ithao123.cn/content-10512579.htmlMPAndroidChart简介 MPAndroidChart是一款基于Android的开源图表库,MPAndroidChart不仅可以在Android设备上绘制各种统计图表,而且可以对图表进行拖动和缩放操作,应用起来非常灵活。和前面介绍的AChartEngine相比,MPAndr
2016-04-18 18:05:43 439
转载 绘图工具
AChartEngine api说明http://blog.csdn.net/cwcwj3069/article/details/48262855对其的说明http://blog.csdn.net/lk_blog/article/details/7645668
2016-04-18 15:28:43 246
原创 10转化16
public static String parseShiLiu(String shiJinZhi){int toInt=Integer.parseInt(shiJinZhi);//String 02会在此转化为2,需要在此加判断,若小于10,则拼接0if(toIntString s="0"+Integer.toHexString(toInt);return s;}else
2016-04-16 10:01:49 189
转载 内存管理
http://blog.csdn.net/chaihuasong/article/details/8289367与windows内存区别 在Linux中经常发现空闲内存很少,似乎所有的内存都被系统占用了,表面感觉是内存不够用了,其实不然。这是Linux内存管理的一个优秀特性,在这方面,区别于 Windows的内存管理。主要特点是,无论物理内存有多大,Linux
2016-04-07 13:23:55 485
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人