
|
| |
|
Here is a Bluetooth The JSR 82 API is supported by Sony Ericsson phones from Java Platform 5 (JP-5) onwards and includes phones such as the K750, K600, W800, Z520 and W810. Use this to see if your phone supports JSR 82: try{ LocalDevice localDevice = LocalDevice.getLocalDevice(); discoveryAgent = localDevice.getDiscoveryAgent(); The deviceDiscovered method is called when a mobile phone is found: public void deviceDiscovered(RemoteDevice remoteDevice, DeviceClass cod) { } When a phone is found, we can search for services on that device: LocalDevice localDevice = LocalDevice.getLocalDevice(); public void servicesDiscovered(int transID, ServiceRecord[] servRecord) { for(int i = 0; i < servRecord.length; i++) { DataElement serviceNameElement = String serviceName = temp_serviceName.trim(); |
Copyright © 2001 - 2009 Sony Ericsson Mobile Communications AB. All Rights Reserved.