Remember to go into Project/Options/Permissions and allow the app to send SMS. The code is:
uses
FMX.Helpers.Android,
Androidapi.JNI.GraphicsContentViewText,
Androidapi.JNI.Net,
Androidapi.JNI.JavaTypes,
Androidapi.JNI.Telephony;
procedure SendSMS (target,messagestr:string);
var
smsManager: JSmsManager;
smsTo: JString;
begin
smsManager:= TJSmsManager.JavaClass.getDefault;
smsTo:= StringToJString(target);
smsManager.sendTextMessage(smsTo, nil, StringToJString(messagestr), nil, nil);
end;
is it possible to access the contact directory of android with XE5?
ReplyDeleteThis comment has been removed by the author.
ReplyDeletehow can validate a php form with a android XE5 app ?
ReplyDeleteI HAVE PROBLEM WITH THIS CODE MY DELPHI XE10 DASE NOT RECONIZ STRINGTOJSTRING
ReplyDeleteMake sure you put Androidapi.Helpers in the uses section.
DeleteMake sure you have Androidapi.Helpers in the uses section.
DeleteMake sure you have Androidapi.Helpers in the uses section.
DeleteMake sure you put Androidapi.Helpers in the uses section.
DeleteMake sure you put Androidapi.Helpers in the uses section.
DeleteThank you brother
Deleteلاه ذا لاه عذبتونا هجاوبو
ReplyDeleteراهم جاوبك
ReplyDelete"
ajoutez Androidapi.Helpers à la place FMX.Helpers.Android, in the uses section.
how can choose the sim card send over .
ReplyDeleteMerci pour les codes, malheureusement ça envoi seulement les messages court! comment envoyer un message long?
ReplyDeleteComment envoyer un message long?
ReplyDeletecomment envoyer un sms sans qu'il affiche dans l'application par défaut du téléphone?
ReplyDeletehow to know that the sms has been sent?
ReplyDeleteconfirmation