Convenient java api for TextMagic sms gateway
The steps to start using TextMagic Java api:
- Create account on http://www.textmagic.com/
- Download textmagic-sms-api.jar
- Download depedencies
- Copy textmagic-sms-api.jar and dependencies to your project class path
- Write code
- have fun :)
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(" :-( ");
}
}
}