How send sms 2automatically 2 a paricular no: only?
Posted
by royalcasanova
on Stack Overflow
See other posts from Stack Overflow
or by royalcasanova
Published on 2010-04-05T04:16:49Z
Indexed on
2010/04/05
4:23 UTC
Read the original article
Hit count: 184
javascript-framework
import net.rim.device.api.io.; import net.rim.device.api.system.; import javax.microedition.io.; import java.util.; import java.io.*; public class SendSms extends Application { private static final int MAX_PHONE_NUMBER_LENGTH = 32; private String addr = "15191112222"; private String msg = "This is a test message."; private DatagramConnection _dc = null; private static String _openString = "sms://"; public static void main(String[] args) { new SendSms().enterEventDispatcher(); } public SendSms() { try { _dc = (DatagramConnection)Connector.open(_openString); byte[] data = msg.getBytes(); Datagram d = _dc.newDatagram(_dc.getMaximumLength()); d.setAddress("//" + addr); _dc.send(d); } catch ( IOException e) {} System.exit(0); } }
© Stack Overflow or respective owner