|  
 
 
       }                             } 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] 下一页  
 |