I am using j2me technology. My application is for sending and receiving sms. Sender can not send sms on specific port and sms always goes to inbox. Is it possible to read sms from inbox in j2me?
4 Answers
No you cannot read SMS from inbox in J2ME. However you can do so using AT commands as I described in this answer.
You can not read SMS from Inbox directly. For reading SMS from Inbox you need APIBridge.jar. Using this .Jar file you can read the SMS from inbox too.
For Sending SMS on a particular port, try this Sending/Receiving SMS from MIDlets
The API Bridge package includes a server component and set of plug-ins that are installed on a Nokia Symbian device. This device component is complemented by a JavaScript™ library, set of ActionScript classes, and a JAR file containing classes and resources that enable the use of the features of the shipped plug-ins.
The other features of APIBridge.Jar
is as follows,
- Uploading files.
- Capturing video, image, and audio.
- Reading files.
- Resizing images.
- Creating image thumbnails.
- Using the logging service.
- Using the location service.
- Using the media management service.
- Sending DTMF tones in an active call.
Please note that APIBridge.jar works for Symbian OS Based Phone Only. Not for S40 Device

- 29,392
- 25
- 90
- 143
-
can you please provide me some link from i can find some help for using the mentioned library file (APIBridge.jar). Thanks in advance !! – May 17 '12 at 18:21
-
sure, just [visit](http://www.developer.nokia.com/Community/Wiki/J2ME_API_Bridge_Interface) this one please. – Lucifer May 18 '12 at 01:26
Yes it can be done with AT-command. I have done it before. J2ME can't read your native SMS can came with the phone unless you write a background processes in Symbian C++ that extracts the SMS from your inbox and handles it to your Java ME application.
In the AT command implementation, you use the following algorithm
Set the phone on text mode by doing this - "AT+CMGF=1" + RETURN, then also send AT+CMGS="RECIPIENT NUMBER " + CTRL+Z. Then, before you can send the AT command to the GSM modem, in your J2ME program, you need to use CommConnection
framework i.e. serial port protocol.

- 52,123
- 16
- 112
- 141

- 11
- 1
You can receive/send SMS messages using WMA https://web.archive.org/web/20070205092831/http://java.sun.com/products/wma/
A sample application can be found here
-
I can send and receive(on specific port) sms, but I need to read sms from inbox because sender sends the message on default port 0, and sms goes to inbox even the listener listen on 0 port, always inbox first "catch" the message. – zule Oct 17 '11 at 12:38
-
Unfortunately you cannot read inbox messages using j2me. It was discussed in [nokia forum](http://www.developer.nokia.com/Community/Discussion/showthread.php?205226-Read-SMS&p=768404&highlight=#post768404) and also already asked here before http://stackoverflow.com/questions/4502370/how-to-read-the-messagesms-from-inbox-using-j2memidp2-0 – neonal Oct 17 '11 at 12:42