Question for jSMS lazarus / 43-Android ---------------------------------------------------------------------- magleft · 2022-05-01 08:46 When build AppSMSDemo1 all is ok and the sms delivered. On my app i set jBroadcastReceiver1.RegisterIntentActionFilter('org.la mw.mysmsapp.SMS_DELIVERED') but not delivered sms. What is error:? Thanks. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAndroidModule1.AndroidModule1JNIPrompt(Sender: TObject);var  manifestPermissions: TDynArrayOfString; begin   //https://developer.an droid.com/guide/topics/security/permissions#normal-dangerous   //https://www.captechconsulting.com/blogs/runtime-permissions-best- practices-and-how-to-gracefully-handle-permission-removal   if IsRuntimePermissionNeed() then   // that is, target API >= 23   begin      ShowMessage('RequestRuntimePermission....');       SetLength(manifestPermissions, 3);       manifestPermissions[0]:= 'android.permission.RECEIVE_SMS';  //from AndroodManifest.xml      manifestPermissions[1]:= 'android.permission.SEND_SMS'; //from AndroodManifest.xml      // required for sms send otherwise error is occured on my device - elera      manifestPermissions[2]:= 'android.permission.READ_PHONE_STATE';       Self.RequestRuntimePermission(manifestPermissions, 2001);       SetLength(manifestPermissions, 0);   end;end; procedure TAndroidModule1.AndroidModule1RequestPermissionResult(  Sender: TObject; requestCode: integer; manifestPermission: string;  grantResult: TManifestPermissionResult);begin   case requestCode of  //android.permission.RECEIVE_SMS      2001:begin              if grantResult = PERMISSION_GRANTED  then              begin                ShowMessage('Success! ['+manifestPermission+'] Permission granted!!! ' );                   if manifestPermission = 'android.permission.RECEIVE_SMS' then                      jBroadcastR eceiver2.RegisterIntentActionFilter('android.provider.Telephony.SMS_RE CEIVED');                   //register custom app action to retrieve DELIVERED status                  if manifestPermission = 'android.permission.SEND_SMS' then                  //                jBroadcastReceiver1.RegisterIntentActionFilter('org.lamw.mysmsapp.SMS _DELIVERED');               end              else//PERMISSION_DENIED                ShowMessage('Sorry... ['+manifestPermission+'] permission not granted... ' )           end;   end;end; procedure TAndroidModule1.jBroadcastReceiver1Receiver(Sender: TObject;  intent: jObject);begin   if (jBroadcastReceiver(Sender).GetResultCode () = RESULT_OK) then    //ok      ShowMessage('Ok. SMS delivered !!')   else      ShowMessage('Sorry... SMS Not delivered...')end; procedure TAndroidModule1.jBroadcastReceiver2Receiver(Sender: TObject;  intent: jObject);var   smsCaller, smsReceived, smsBody: string;   auxList: TStringList;begin   if IsRuntimePermissionGranted('android.permission.RECEIVE_SMS')  then   begin      ShowMessage('New Message Receiving ....');      smsReceived:= jSMS1.Read(intent, '#');      if smsReceived <> '' then      begin         auxList:= TStringList.Create;         auxList.Delimiter:= '#';         auxList.StrictDelimiter:= True;       auxList.DelimitedText:= smsReceived;         if auxList.Count > 1 then;         begin           smsCaller:= auxList.Strings[0];         smsBody:=  auxList.Strings[1];           jEditText3.AppendLn('['+ smsCaller+']');           jEditText3.AppendLn(smsBody);           jEditText3.AppendLn(' ');         end;         auxList.Free;      end;   end   else  ShowMessage('Sorry.. Runtime [RECEIVE_SMS] Permission NOT Granted ...');end; procedure TAndroidModule1.jButton1Click(Sender: TObject);begin   if IsRuntimePermissionGranted('android.permission.SEND_SMS')  then   begin     if jSMS1.Send(jEditText1.Text, jEditText2.Text  , 'org.lamw.mysmsapp.SMS_DELIVERED') >= 1 then  //warning: for message mult-parts return "parts_count" [thanks to CC!]       ShowMessage('Message Sending .... OK!')     else       ShowMessage('Message Sending .... Fail!');   end   else  ShowMessage('Sorry... Runtime [SEND_SMS] Permission NOT Granted ...'); end; ---------------------------------------------------------------------- magleft · 2022-05-03 12:09 Does anyone have any idea about the correct value of the parameter? Any idea would help. Thanks ---------------------------------------------------------------------- jmpessoa · 2022-05-03 22:24 Hi, magleft! What about  projects  "AndroidManifest.xml"? You can try to compares its... ---------------------------------------------------------------------- magleft · 2022-05-04 12:28 I attach the file AndroidManifest.xml of mySmsApp and AndroidManifest.xml of AppSMSDEMO1. I think both of files have all permissions. I don't  understand where is the problem. Thanks ---------------------------------------------------------------------- jmpessoa · 2022-05-04 18:33 Well, you can try check if the Object Inspector events properties are correctly connected to your code... side note: can you send the message? ---------------------------------------------------------------------- magleft · 2022-05-07 06:52 Hello. When i change android:targetSdkVersion="29" to android:targetSdkVersion="24" works fine. In attachments files showing my sdk. What must be doing ?