Sending files from my PC (using the OS's bluetooth send app.) to my phone's J2ME app.
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:
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.
this.localDevice = LocalDevice.getLocalDevice();
SessionNotifier sc =
(SessionNotifier) Connector.open("btgoep://localhost:" +
new UUID(0x1105).toString() + //i've tried 1106 here as well
ServiceRecord sr = localDevice.getRecord(sc);
Connection c = sc.acceptAndOpen(new Handler(this.callback));
Last edited by yesyes; 01-29-2009 at 12:56 AM.
By dogman in forum Mobile
Last Post: 08-31-2011, 08:21 AM
By anaisafranco in forum Mobile
Last Post: 01-22-2008, 02:10 PM
By forumname in forum Mobile
Last Post: 10-18-2007, 02:50 PM
By Rimvis in forum Enterprise
Last Post: 08-30-2002, 04:43 AM
By Rajesh in forum Mobile
Last Post: 11-18-2001, 04:40 AM
Tags for this Thread
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL