Send a multi-part message in Firemonkey android

  

The following code is used to send the message in FMX android:

uses
Androidapi.JNI.JavaTypes, Androidapi.JNI.Telephony;

procedure TForm1.Button1Click(Sender: TObject);
var
smsTo: JString;
smsManager: JSmsManager;
begin
smsManager := TJSmsManager.JavaClass.getDefault;
smsTo := StringToJString(Edit1.text);
PendIntent1:=TJPendingIntent.JavaClass.getBroadcast();
PendIntent2:=TJPendingIntent.JavaClass.getBroadcast();
smsManager.sendTextMessage(smsTo, nil, StringToJString(mSms.lines.text),PendIntent1,PendIntent2);
end;

But if the text of a message is more than the default, the code does’t work.
This means that if I have a 3-page message, only one page will be sent or not sent at all.

What is the solution to this problem?

Comments are closed.