Пожалуйста, попробуйте этот код ниже и добавьте разрешение SEND_SMS.
try {
SmsManager smsManager = SmsManager.getDefault();
ArrayList<String> parts = smsManager.divideMessage(sb.toString());
//smsManager.sendTextMessage(phoneNumber, null, message, null, null);
smsManager.sendMultipartTextMessage(phone, null, parts,
null, null);
Toast.makeText(activity, "Send Message Successfully ", Toast.LENGTH_SHORT).show();
} catch (Exception e) {
Toast.makeText(getApplicationContext(), "SMS Failed !", Toast.LENGTH_LONG).show();
e.printStackTrace();
}
Ниже код для меня в Oppo Телефоны попробуйте это
SmsManager sms = SmsManager.getDefault();
List<String> messages = sms.divideMessage(message);
for (String msg : messages) {
PendingIntent sentIntent = PendingIntent.getBroadcast(this, 0, new Intent("SMS_SENT"), 0);
PendingIntent deliveredIntent = PendingIntent.getBroadcast(this, 0, new Intent("SMS_DELIVERED"), 0);
sms.sendTextMessage(phone, null, msg, sentIntent, deliveredIntent);
Toast.makeText(activity, "Send Message Successfully", Toast.LENGTH_SHORT).show();
}