import org.smslib.AGateway.Protocols;
import org.smslib.Message.MessageEncodings;
import org.smslib.OutboundMessage;
import org.smslib.Service;
import org.smslib.modem.SerialModemGateway;
public class Send {
public static void main(String args[]) throws Exception{
Service srv=Service.getInstance();
SerialModemGateway gateway = new SerialModemGateway("modem.com3","COM3", 9600, "WAVECOM", "");
gateway.setProtocol(Protocols.PDU);
gateway.setInbound(true);
gateway.setOutbound(true);
gateway.setSimPin("0000");
srv.addGateway(gateway);
srv.startService();
OutboundMessage msg=new OutboundMessage("15977104664", "hello");
msg.setDstPort(77);
msg.setStatusReport(true);
msg.setEncoding(MessageEncodings.ENCUCS2);
srv.sendMessage(msg);
System.out.println(msg);
}
}
seeking a code that can send text messages , send text messages .
------ Solution ---------------------------------------- ----
this stuff to ask colleagues for help
------ For reference only ----------------------- ----------------
------ For reference only ------------------------------------ ---
nobody engaged in it .
------ For reference only ---------------------------------------
help ask chant.
------ For reference only ---------------------------------------
I can send text messages, only able to send a second , stopService not closed , sending the second on the error , there is great God enlighten Well ?
回复删除Thanks for sharing
Msgclub have two types of sms api Java; XML and JSON for sending SMS in bulk to your prospects from our gateway.