Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void sendSMS()
- {
- try {
- String Response = m_Cmd.send("AT+cmgf = 1\r");
- System.out.println(Response);
- Response = m_Cmd.send("AT+CMGS=\"041415603\"\r"); //here you put your nummber
- System.out.println(Response);
- Response = m_Cmd.send("Prekinitev napajanje na GSM modulu!" + (char) 26); //here you put text that is inside the SMS
- System.out.println(Response);
- String ctrlZ = (char)26 + "";
- m_Cmd.send(ctrlZ, new RspListener()); //escapse character, that marks end of SMS content
- } catch (ATCommandFailedException ex) {
- ex.printStackTrace();
- } catch (IllegalStateException ex) {
- ex.printStackTrace();
- } catch (IllegalArgumentException ex) {
- ex.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement