Would be useful to add to the Send method (PhoneSMS library) 2 named parameters (ex: AllowDeliveryEvent and AllowSentEvent) to handle the 2 intents
B4X:
public static void Send(String PhoneNumber, String Text) {
SmsManager sm = SmsManager.getDefault();
Intent i1 = new Intent("b4a.smssent");
i1.putExtra("phone", PhoneNumber);
PendingIntent pi = PendingIntent.getBroadcast(BA.applicationContext, 0,i1, PendingIntent.FLAG_UPDATE_CURRENT);
Intent i2 = new Intent("b4a.smsdelivered");
i2.putExtra("phone", PhoneNumber);
PendingIntent pi2 = PendingIntent.getBroadcast(BA.applicationContext, 0,i2, PendingIntent.FLAG_UPDATE_CURRENT);
sm.sendTextMessage(PhoneNumber, null, Text, pi, pi2);
}