Java SMS API Script
Visit the Java SMS API Project at: http://code.google.com/p/textmagic-sms-api-java/This Java wrapper provides a way to integrate our Bulk SMS Gateway to your Java application.
This is how you can get started with Java:
- Create a TextMagic account on http://www.textmagic.com/
- Download textmagic-sms-api.jar
- Download dependencies
- Copy textmagic-sms-api.jar and dependencies to your project class path
- Write Code
Java Code Example
import com.textmagic.sms.TextMagicMessageService;
import com.textmagic.sms.exception.ServiceException;
public class DummyCode {
public static void main (String []argz) {
String dummyPhone = "99912345678";
TextMagicMessageService service =
new TextMagicMessageService ("my_login","my_password");
try {
service.send("Hello, World!", dummyPhone);
} catch(ServiceException ex) {
System.out.println(" :-( ");
}
}
}