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 fr
No you cannot read SMS from inbox in J2ME. However you can do so using AT commands as I described in this answer.
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.
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
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,
Please note that APIBridge.jar works for Symbian OS Based Phone Only. Not for S40 Device