Bluetooth API in JavaME

[email protected] Mon, 21 Jul 2008 06:53:45 PDT
Newsgroups gmane.comp.java.sun.kvm
Message-ID <12617526.58561216648456202.JavaMail.tomcat@sdcst12.sjc.collab.net>
Hi Guys,

I'm not been able to find any bluetooth devices using the JavaME's bluetooth API. See code sample below:

public class ListDevices extends MIDLet implments DiscoveryListener{
  . . . 

 public void searchAvailableDevices(){
   device = LocalDevice().getLocalDevice();
   agent = device.getDiscoveryAgent();
   agent.startInquiry(DiscoveryAgent.GIAC,this);
}
public void deviceDiscovered(RemoteDevice rDevice, DeviceClass cod){
  System.out.println(rDevice.getFriendlyName(true));
  //search services code
}
}

I'm running this code on Netbeans IDE 6.1 running Sun java wireless tookit 2.5.2 for CLDC emulator platform. I have a mobile phone which is bluetooth enabled. 

Any clues?

Cheers,

A
[Message sent by forum member 'alpha_manic' (alpha_manic)]

http://forums.java.net/jive/thread.jspa?messageID=288056

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff KVM-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".