Description: import java.io.*
import javax.bluetooth.*
public class LocalInfo
{
public static void main(String args[]) throws BluetoothStateException {
LocalDevice localdev = null
try {
localdev = LocalDevice.getLocalDevice()
} catch (BluetoothStateException e) {
System.out.println("ERROR: cannot access local device")
System.exit(1)
}
System.out.println("a local bluetooth device is found:")
System.out.println(" Name: "+ localdev.getFriendlyName())
System.out.println("Address: "+ localdev.getBluetoothAddress())
System.out.println("\nIts device classes are:")
DeviceClass devcla = localdev.getDeviceClass()
System.out.println(devcla.toString())
System.out.println("Service Class: "+ devcla.getServiceClasses())
System.out.println("Major Device Class: "+ devcla.getMajorDeviceClass())
System.out.println("Minor Device Class: "+ devcla.getMinorDeviceClass())
}
}
To Search:
File list (Check if you may need any files):
BluetoothChat\.classpath
.............\.project
.............\AndroidManifest.xml
.............\bin\BluetoothChat.apk
.............\...\classes.dex
.............\...\.om\example\android\BluetoothChat\BluetoothChat$1.class
.............\...\...\.......\.......\.............\BluetoothChat$2.class
.............\...\...\.......\.......\.............\BluetoothChat$3.class
.............\...\...\.......\.......\.............\BluetoothChat.class
.............\...\...\.......\.......\.............\BluetoothChatService$AcceptThread.class
.............\...\...\.......\.......\.............\BluetoothChatService$ConnectedThread.class
.............\...\...\.......\.......\.............\BluetoothChatService$ConnectThread.class
.............\...\...\.......\.......\.............\BluetoothChatService.class
.............\...\...\.......\.......\.............\DeviceListActivity$1.class
.............\...\...\.......\.......\.............\DeviceListActivity$2.class
.............\...\...\.......\.......\.............\DeviceListActivity$3.class
.............\...\...\.......\.......\.............\DeviceListActivity.class
.............\...\...\.......\.......\.............\R$attr.class
.............\...\...\.......\.......\.............\R$drawable.class
.............\...\...\.......\.......\.............\R$id.class
.............\...\...\.......\.......\.............\R$layout.class
.............\...\...\.......\.......\.............\R$menu.class
.............\...\...\.......\.......\.............\R$string.class
.............\...\...\.......\.......\.............\R.class
.............\...\resources.ap_
.............\default.properties
.............\gen\com\example\android\BluetoothChat\R.java
.............\res\drawable\app_icon.png
.............\...\........-hdpi\app_icon.png
.............\...\layout\custom_title.xml
.............\...\......\device_list.xml
.............\...\......\device_name.xml
.............\...\......\main.xml
.............\...\......\message.xml
.............\...\menu\option_menu.xml
.............\...\values\strings.xml
.............\src\com\example\android\BluetoothChat\BluetoothChat.java
.............\...\...\.......\.......\.............\BluetoothChatService.java
.............\...\...\.......\.......\.............\DeviceListActivity.java
.............\bin\com\example\android\BluetoothChat
.............\gen\com\example\android\BluetoothChat
.............\src\com\example\android\BluetoothChat
.............\bin\com\example\android
.............\gen\com\example\android
.............\src\com\example\android
.............\bin\com\example
.............\gen\com\example
.............\src\com\example
.............\bin\com
.............\gen\com
.............\res\drawable
.............\...\drawable-hdpi
.............\...\drawable-ldpi
.............\...\drawable-mdpi
.............\...\layout
.............\...\menu
.............\...\values
.............\src\com
.............\assets
.............\bin
.............\gen
.............\res
.............\src
BluetoothChat