Reading SMS from inbox in j2me

我是研究僧i 提交于 2019-12-02 03:55:29
funkybro

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

TSOKOH FRANK GBESIMI

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 http://java.sun.com/products/wma/

A sample application can be found here

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!