We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, a pretty simple solution to send SMS messages from a processing application via adb.
1 - Place adb server application in /data
2 - to send a message, follow this code (before import java.io.*):
 try {
        Runtime.getRuntime().exec(dataPath("")+"/adb shell input keyevent 3"); //send home button event (you can use keyevent 26 to emulate power button)
      }
      catch(Exception e) {
        println(e);
      }
      try {
        String command = dataPath("")+"/adb shell am start -a android.intent.action.SENDTO -d sms:"+num+" --es sms_body \""+texte+"\" --ez exit_on_sent true";
        Runtime.getRuntime().exec(command);
      }
      catch(Exception e) {
        println(e);
      }
      delay(1000);
      try {
        Runtime.getRuntime().exec(dataPath("")+"/adb shell input keyevent 22");
      }
      catch(Exception e) {
        println(e);
      }
      try {
        Runtime.getRuntime().exec(dataPath("")+"/adb shell input keyevent 66");
      }
      catch(Exception e) {
        println(e);
      } 
Comments
For example a simple sms application. Edit : you need adb root access to read database in your phone
main.pde
gui.pde