4344454647484950515253
//start the service so that we can send and receive messages app.startService(); //send a test message app.getService().sendMessage(new OutboundMessage("+254737511981", "Server ping")); //wait for incoming messages app.waitForInput(); //stop all services and threads
27282930313233343536
public SmsMessageHandler() { } public String sendMessage() throws Exception { OutboundMessage msg = new OutboundMessage(recipient, content); msg.setStatusReport(statusReportEnabled); Service.getInstance().sendMessage(msg); return msg.getRefNo(); }