×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    10

    controlling cell phone via bluetooth

    hi all
    i have a final project about bluetooth remote control
    i have sent message between from on cell phone to other
    i want when the other cell pohne recieve the message
    if it recieved "close" message
    exit from midlet
    plz can any one help me with that

    this is the code of recieving message in the other cell phone

    try{ Local = LocalDevice.getLocalDevice();
    Local.setDiscoverable(DiscoveryAgent.GIAC);
    StreamConnectionNotifier notify = (StreamConnectionNotifier)Connector.open("btspp://localhost:" + RFCOMM_UUID );
    con = (StreamConnection)notify.acceptAndOpen();
    in = con.openDataInputStream();
    StringBuffer b = new StringBuffer();
    int ch;
    while ((ch = in.read()) != -1) {
    b.append((char) ch);
    }

    if(b.toString().substring(0, 1).equals("f")){
    Alert alrt=new Alert("Welcom","control",null,AlertType.ALARM);

    Display display ;
    display = Display.getDisplay(midlet);
    display.setCurrent(alrt);

    }else{
    t = new TextBox("Recieve Message", b.toString(), 1024, 0);
    t.addCommand(Exit1);
    t.setCommandListener(midlet);
    Display display = getDisplay();
    display.setCurrent(t);}

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105

    Re: controlling cell phone via bluetooth


Similar Threads

  1. Replies: 0
    Last Post: 2009-01-30, 16:31
  2. Replies: 3
    Last Post: 2009-01-29, 13:38
  3. Replies: 3
    Last Post: 2008-09-22, 22:27
  4. Control Cell phone using Java and Bluetooth
    By proyecthunter in forum Bluetooth Technology
    Replies: 0
    Last Post: 2006-10-13, 15:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×