2

i need to send sms (text string) from one mobile to another mobile using bluetooth. Im developing this using J2ME.

I know basics of J2ME and midlets. And have managed to detect active mobile bluetooth device in proximity.

What all java library files and functions would i need to send an sms?

Ivin
  • 4,435
  • 8
  • 46
  • 65
  • I think that really depends on the phone's manufacturer. I doubt there's an API common to all phones. It'll be different depending on the platform. –  Apr 16 '12 at 06:37
  • Do you know where i can get a documentation of such API? For nokia mobiles maybe. – Ivin Apr 16 '12 at 06:39
  • See http://stackoverflow.com/questions/3701551/why-does-my-j2me-bluetooth-code-hangs-after-an-incoming-rfcomm-connection .. its the same concept just `out.write` with the SMS you wan to send – Baba Apr 16 '12 at 12:01

1 Answers1

2

You can't "send SMS over bluetooth".

If you are looking for a way to send a piece of text from one handset to another, a good bet would be to create a MIDlet to use JSR 82 OBEX to send a string with the MIME header text/plain -- on some handsets this will be interpreted as an incoming note which can then be read.

For a full Bluetooth chat system, you would need a receiving MIDlet on the other side, and probably to create your own custom protocol between them.

There are already apps out there which do this.

funkybro
  • 8,432
  • 6
  • 39
  • 52