private void send2(String number, String message){ SmsManager smsm = SmsManager.getDefault(); short port = 1000; PendingIntent pi = PendingIntent.getBroadcast(test.this, 0, new Intent(), 0); smsm.sendDataMessage(number, null, port, message.getBytes(), pi, null); }