Package org.smslib

Examples of org.smslib.EzTextingOutboundMessage


  public void doIt() throws Exception
  {
    try
    {
      EzTextingOutboundMessage msg;
      System.out.println("Example: Send message from ExTexting HTTP Interface.");
      System.out.println(Library.getLibraryDescription());
      System.out.println("Version: " + Library.getLibraryVersion());
      EzTextingHTTPGateway gateway = new EzTextingHTTPGateway("eztexting.http.1", "username", "password");
      gateway.setOutbound(true);
      Service.getInstance().addGateway(gateway);
      Service.getInstance().startService();                     
      // Query the service to find out our credit balance.
      System.out.println("Remaining credit: " + gateway.queryBalance());
      // Send a message synchronously.
      msg = new EzTextingOutboundMessage("3616885766", "Hello from SMSLib (EzTexting handler)", "subject", true);             
      Service.getInstance().sendMessage(msg);     
      System.out.println(msg);
      System.out.println("Now Sleeping - Hit <enter> to terminate.");     
      System.in.read();   
      Service.getInstance().stopService();
View Full Code Here

TOP

Related Classes of org.smslib.EzTextingOutboundMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.