×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    19

    Question Send image over Bluetooth - 2 Questions

    Hello everyone.


    I'm trying to figure out how to make a J2ME App that sends an image to another phone (just like the phone does natively). I mean without the Client - Server paradigm. In other words, no Server.

    I've programmed a J2ME bluetooth midlet that sends an image to another device. This midlet successfully sends the image to a sony ericsson phone from my Nokia E71. I do a device discovery, get the address and then I set the channel to 4 like this:

    String adr = "btgoep://" + deviceAddress + ":4";

    I'm using aventanaobex to set up the connection and to send the image.

    BUT when I try sending the same image in the same channel to another phone (for example, a Nokia N73) it fails. This happens with others phones too. It won't do a thing. If I change the channel, it does ask for permission to send, however, nothing is sent.

    So my First question is: 1) how do I get the channels? Does every phone has its own channel to transmit the image?

    I also used Device Search with bluetooth after finding a device. But It won't find any service at all (I'm looking for 0x1105 - obex push).

    My second question would be: 2) Is there an alternative way to implement this server-less app with/without obex? Maybe it would be by finding services first?

    thanks in advance!

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

    Re: Send image over Bluetooth - 2 Questions

    Quote Originally Posted by aztroboy View Post
    If I do a Service Search in J2ME
    Exactly, that is the solution because a search finds all services with that UUID, no matter how the remote device offers that service (via MIDlet or natively).
    Quote Originally Posted by aztroboy View Post
    In other words, no Server.
    Still, there is a server. Although, you had not to code the server because you use the native one of your remote device.
    Quote Originally Posted by aztroboy View Post
    String adr = "btgoep://" + deviceAddress + ":4";
    I'm using aventanaobex to set up the connection and to send the image.
    If you do not use the package javax.obex, make sure to change the URL from btgoep to btspp. Otherwise, the platform returns the wrong subclass of the Connector class. For details, please, have a look at the documentation of Aventana.
    Quote Originally Posted by aztroboy View Post
    I also used Device Search with bluetooth after finding a device. But It won't find any service at all (I'm looking for 0x1105 - obex push).
    Then you have (found or created) a coding bug. If you do not spot it, we would need a bit of code.
    Quote Originally Posted by aztroboy View Post
    Maybe it would be by finding services first
    I did not understand this question, yet. At the moment, what do you do first instead of that?

Similar Threads

  1. send image to phone over bluetooth using OBEX
    By utako in forum Bluetooth Technology
    Replies: 3
    Last Post: 2008-08-05, 09:52
  2. send a image from pc to phone via bluetooth
    By bballbeng in forum Symbian
    Replies: 0
    Last Post: 2006-08-23, 09:42
  3. send image via bluetooth
    By adhiyal in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2004-09-29, 22:05
  4. send a image via bluetooth
    By klaus15 in forum Symbian
    Replies: 2
    Last Post: 2004-03-08, 08:39
  5. Send an image from the 7650 to a laptop using Bluetooth
    By dgilders in forum Bluetooth Technology
    Replies: 2
    Last Post: 2002-10-14, 22:49

Posting Permissions

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