Send Bulk SMS with Java iSMS Australia
How to Send SMS with Java
Java is one of the leading programming language used by developers all over the world for developing new applications.
iSMS Australia has further developed its services by allowing SMS to be sent using Java application by iSMS Australia gateway.
View more available features and configurations on Custom API page.
Download SMS with Java DemoLearn more about sending SMS with other programming languages.
A sample with iSMS API Keys has been included. Please begin with the code on the right:
Note:
- Replace un, pwd and dstno with your iSMS account username, password and recipient number with international prefix.
- Mobile numbers can be separated by comma (,)
Click "isms" to send SMS after the application is successfully compiled.
import java.awt.*; import java.awt.event.*; import java.net.*; import java.net.URL; import javax.swing.*; public class isms { public static void main(String[] args) throws Exception
{ final URI ismsurl = new URI("http://www.isms.com.my/isms_send.php?un=xxxx&pwd=xxxxxx&dstno=xxxxxxxxxx&msg=Hi.&type=1&sendid=xxxxx"); JFrame frame = new JFrame("ISMS"); frame.setSize(150, 150); frame.setVisible(true); frame.setResizable(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Container contentPane; contentPane=frame.getContentPane(); JButton sendbutton = new JButton("isms"); sendbutton.setForeground(Color.RED); sendbutton.setBounds(0,0,150,150); sendbutton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (Desktop.isDesktopSupported()) { Desktop desktop = Desktop.getDesktop(); try { desktop.browse(ismsurl); } catch (Exception ex) { } } } }); contentPane.add(sendbutton); } }