发送使用Java ME应用程序短信 [英] Sending SMS using Java ME application

查看:247
本文介绍了发送使用Java ME应用程序短信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要一个Java ME应用程序传输到接收使用蓝牙电脑的任何短信。然后PC可以通过蓝牙直接在Java ME应用程序发送一个响应的短信。是否有库可用于这种架构或我要设计它自己?
这是正确的做法,或一个更好的存在?我想用蓝牙的话,我不会对线缆的依赖。

I want to a Java ME application that transfers any SMS received to a PC using bluetooth. The PC can then direct the Java ME application via bluetooth to send a response SMS. Is there library available for this architecture or I have to design it myself? Is this approach correct or a better one exists? I want to use bluetooth as then I will not have dependency on the cable.

推荐答案

您需要这个自己创建,但是你会发现,你想要什么J2ME你不能这样做。

You'll need to create this yourself, however you'll find that you can't do what you want with J2ME.

J2ME无法访问任何旧手机短信,手机收到,唯一发送给在其上的MIDlet正在侦听特定端口。因此,要获得所有其他的短信,请在我在<所描述的方式的蓝牙串行/拨号连接到您的手机href=\"http://stackoverflow.com/questions/294688/make-an-incoming-call-on-my-mobile-trigger-an-action-on-my-pc/565788#565788\">this回答。

J2ME can't access any old SMS that the handset receives, only ones sent to a specific port upon which the MIDlet is listening. So to get all the other SMSes, create a bluetooth serial/dial-up connection to your handset in the way I've described in this answer.

创建PC客户端反复的问题 AT + CGML (如上面的答案链接到AT命令集文档中描述)的命令,看哪个当SMS具有被接收到。使用 AT + CGMR 来读取和解析消息文本。然后使用 AT + CGMS 来发送一个响应。这些都可以通过蓝牙完成。

Create a PC client which repeatedly issues AT+CGML commands (as described in the AT command set document linked to in the answer above), to see when an SMS has been received. Use AT+CGMR to read and parse the message text. Then use AT+CGMS to sent a response. This can all be done over bluetooth.

这是更好地使用串行连接来发送响应,因为一个MIDlet通常不能被触发根据来电蓝牙数据开业。

It's better to use the serial connection to send a response, because a MIDlet cannot usually be triggered to open based on incoming bluetooth data.

希望这有助于。

这篇关于发送使用Java ME应用程序短信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆