|
-
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 12:56 AM.
Similar Threads
-
By dogman in forum Mobile
Replies: 30
Last Post: 08-31-2011, 08:21 AM
-
By anaisafranco in forum Mobile
Replies: 4
Last Post: 01-22-2008, 02:10 PM
-
By forumname in forum Mobile
Replies: 1
Last Post: 10-18-2007, 02:50 PM
-
By Rimvis in forum Enterprise
Replies: 0
Last Post: 08-30-2002, 04:43 AM
-
By Rajesh in forum Mobile
Replies: 0
Last Post: 11-18-2001, 04: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
Forum Rules
|
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
|
Bookmarks