[j2me] sending files from mobile phone to PC via OBEX bluetooth -- UUID problem?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 8 of 8

Thread: [j2me] sending files from mobile phone to PC via OBEX bluetooth -- UUID problem?

Threaded View

  1. #1
    Join Date
    Jan 2009
    Posts
    4

    Sending files from my PC (using the OS's bluetooth send app.) to my phone's J2ME app.

    Hi,

    I have created an application that can send and receive files via OBEX. I have sent files to other mobile phones. And in the emulator, I have demonstrated my application's ability to receive files from a copy of the application which sends a file. I can also send files from my phone to my PC without problems.

    However, even though I can receive files from another copy of my application in the emulator, when I try to send a file from my PC, using the standard bluetooth send utilities, to my application the application does not register the connection. My phone displays its standard receive file dialogue, completely missing out my application.

    I cannot decide if it's a problem with my phone - I doubt it - or my server side code not registering itself properly, and hence why the phone deals with the incoming connection and not my application.

    My server side code looks like this:

    Code:
                this.localDevice = LocalDevice.getLocalDevice();
                localDevice.setDiscoverable(DiscoveryAgent.GIAC);
                SessionNotifier sc =
                        (SessionNotifier) Connector.open("btgoep://localhost:" +
                                                                   new UUID(0x1105).toString() + //i've tried 1106 here as well
                                                                   ";name=Hi;authorize=false");
                ServiceRecord sr = localDevice.getRecord(sc);
                System.out.println("starting server");
                Connection c = sc.acceptAndOpen(new Handler(this.callback));
    All I can think is that the UUID, which is set to OBEX, (see here: http://ants.dif.um.es/~felixgm/docen...ooth/UUID.html) is wrong somehow, or that I need some more UUIDs so the application picks up all incoming connections, but I know very little about this subject and my research has come to somewhat of a dead end.

    Any thoughts?
    Last edited by yesyes; 01-29-2009 at 01:56 AM.

Similar Threads

  1. Replies: 30
    Last Post: 08-31-2011, 09:21 AM
  2. Replies: 4
    Last Post: 01-22-2008, 03:10 PM
  3. Replies: 1
    Last Post: 10-18-2007, 03:50 PM
  4. Sending message to mobile phone
    By Rimvis in forum Enterprise
    Replies: 0
    Last Post: 08-30-2002, 05:43 AM
  5. Displaying XML files in a Mobile Phone??
    By Rajesh in forum Mobile
    Replies: 0
    Last Post: 11-18-2001, 05:40 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center