Add a Bluetooth text protocol to J2ME apps

package bluetooth.livingroom;

import com.ibm.btevents.*;

public class TelephoneMonitor extends MIDlet implements BTEventListener,
PhoneListener {

private BTManager btManager;

public TelephoneMonitor() {
btManager = new BTManager(this);
}

public void incomingCall(PhoneEvent event) {
btManager.sendMessage(
"bluetooth.livingroom.TelevisionMonitor",
"incomingCall:"+event.getCaller()
);
}

public void callEnded(PhoneEvent event) {
btManager.sendMessage(
"bluetooth.livingroom.TelevisionMonitor",
"callEnded:"+event.getDuration()
);
}

public void messageReceived(BTEvent event) {}
public void messageSent(BTEvent event) {}
public void devicesDiscovered(BTEvent event) {}
public void diagnosticMessage(BTEvent event) {}

}


Get More Information in http://www-128.ibm.com/developerworks/wireless/library/wi-javab

1 comment:

  1. Atleast found it here......Thanks for the code anyways.


    http://viptechworld.blogspot.con

    ReplyDelete

 

Design by Blogger Buster | Distributed by Blogging Tips