Code example for SmsManager: Sending Text Messages (SMS)

Methods: sendTextMessage

130
        if(message.length() > 160) {                                // 160 chars = max. length of single part sms.
           message = message.substring(0, 160);
        } 
        MessageHandler.addNumber(recipient);                        // Adding number to the notified-list,
                                                                    //  to avoid duplications. 
        SM.sendTextMessage(recipient, null, message, null, null);   // Sending single part message.
    } 
 
} 
Connect your IDE to all the code out there  Get Codota for Java