Android Question Sms.send2 : SMS not always sent

lemonisdead

Well-Known Member
Licensed User
Longtime User
Hello,

I have a problem. I don't know if it is a bug. I updated the Phone library to the new v2.20. Since I updated, I have some SMS not sent immediately and even not sent. Like if the SMS were stored in the queue.

I have checked my code and tried with the simplest :

Sub Process_Globals
Dim Sms As PhoneSms
End Sub

Sub Activity_Create(FirstTime As Boolean)
Dim x As Int
For x=1 To 5
Sms.Send2("THE PHONE NUMBER","TEST "&x,false,false)
Next
Activity.Finish
End Sub

Have you got this trouble before ? Any idea to fix it ?
Thanks a lot
 

ta1dr

Member
Licensed User
Longtime User
Hi Erel
I updated version 3.0. Could you write simple code for PhoneSms.Send2 - send sms without notifications. I tried but I didnt
regards
 
Upvote 0

lemonisdead

Well-Known Member
Licensed User
Longtime User
Hello Erel,

Thanks for your reply. Here is my report:
  • using the old Sms.Send sends the messages like an automatic gun (immediately and chained)
  • using the new Sms.Send2 with true, true sends the messages exactly like Sms.Send
  • but using Sms.Send2 with false, false needs to introduce a small delay (I made tests with 4 seconds between each message)
That's surely not a bug but a behaviour of my Acer V370 (Jelly Bean).

Thanks for your help (I turned around many hours) :)
 
Upvote 0

Gregg Homan

Member
Licensed User
Longtime User
Hi, I am confused as to why ps.Send2(), per code listed below and per Erel's suggested code listed above, will not compile fas if the Send2 method is not available to me for some reason yet ps.Send() works fine; can some explain to me why this is the case and what I am missing?. BTW, my phone library is v2.10. Thanks, Gregg.

B4X:
Dim ps AsPhoneSms
ps.Send2("123456", "message", false, false) 'does not compile
ps.Send("123456","message") 'works fine
 
Upvote 0

Gregg Homan

Member
Licensed User
Longtime User
I am running B4A V2.71 ... I will update to the latest version later today and try to running ps.Send2() again. Thanks, Gregg
 
Upvote 0

Gregg Homan

Member
Licensed User
Longtime User
Erel,

After upgrading from B4A 2.71 to B4A V3.20 which also upgraded phone library from V2.1 to V2.2, ps.Send2() compiled just fine.

Thanks,
Gregg
 
Upvote 0
Top