您现在的位置: 爱51代码网 >> 范文 >> 文章正文
android蓝牙串口连接代码
       }
              
            } catch (IOException e) {
                Log.e(TAG, "close() of connect socket failed", e);
            }
        }
    }

 

 

ImprovedBluetoothDevice 这个类


/* Copyright (C) 2011, Kenneth Skovhede
 * * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
*/
package com.example.bluetoothconnection.util;毕业论文 


import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.UUID;


import com.example.bluetoothconnection.R;
import com.example.bluetoothconnection.R.string;


import android.app.AlertDialog;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothClass;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Parcel;
import android.os.ParcelUuid;
import android.util.AndroidRuntimeException;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;


//Class that mimics a regular android.bluetooth.BluetoothDevice,
// but exposes some of the internal methods as regular methods


public class ImprovedBluetoothDevice {
public final BluetoothDevice mDevice;

private static Method getMethod(Class<?> cls, String name, Class<?>[] args) {
try {
return cls.getMethod(name, args);
} catch (Exception ex) {
return null;
}
}

private static Constructor<?> get

上一页  [1] [2] [3] [4] [5] [6] 下一页

  • 上一篇文章:

  • 下一篇文章: 没有了
  • 最新文章 热点文章 相关文章
    mysql主从同步延迟方案解决的学习
    青岛科学六年级下册教材分析
    生日旅行总结
    中小板生日快乐随感
    送生日快乐桑葚乳酪小蛋糕
    写给女儿的生日快乐
    总分公司财务核算
    恢复使用繁体字可行性研究报告
    青少年吸烟心理探析
    保险受益人制度相关问题的探讨
    mysql主从同步延迟方案解决的学习
    生日旅行总结
    中小板生日快乐随感
    送生日快乐桑葚乳酪小蛋糕
    写给女儿的生日快乐
    总分公司财务核算
    恢复使用繁体字可行性研究报告
    保险受益人制度相关问题的探讨
    初中生地理读图能力培养的研究
    搞笑生日祝福
    Preview of Qt 5 for Androi
    VS2010 cocos2d-x 工程配置 
    windows正在配置Windows Ins
    班主任的工作技能
    暖通空调施工图存在的问题及
    多媒体在政治教学中的应用
    浅议散文的质与形
    wince6.0拨号错误 错误号666
    关于AT24c02d的连续读写问题
    呼叫中心团队长竞聘演讲稿
     



    设为首页 | 加入收藏 | 网站地图 | 友情链接 |