I have a midlet that could send sms. in J2me the sms is with a port number. But I want it sent to any mobile without specifying the port number. Could I achieve that? Or is it possible if I send from server sider through SMS gateway API to any mobiles?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
As far as I know if you specify the port number to 0, it will send the SMS as a standard SMS and the other phone will receive it and put the message in the Inbox.
String url = "sms://1234567:0";
MessageConnection conn = (MessageConnection)Connector.open(url);
TextMessage msg = (TextMessage)conn.newMessage(MessageConnection.TEXT_MESSAGE);
msg.setPayloadText("hello");
conn.send(msg);
conn.close();
I hope it helps!