Hello; I created a app for sms sending for all contact list.
I complate my app. So Now i find a bug.
I have recive PE_Send status Erroe= generic faliure when msessage length is long (ex. 180 char)
Why i recive error for long message?
and , each send prog cycle is very short.
Exp.: for 10 contact >> short mesagge cycle time = 10-15 second (result is good)
for 10 contact >> Long message cycle time = 1-3 second (result is error)
How can i fix it?
This pictures my log for short message
this picture is log for generic failure with short message
I complate my app. So Now i find a bug.
I have recive PE_Send status Erroe= generic faliure when msessage length is long (ex. 180 char)
Why i recive error for long message?
and , each send prog cycle is very short.
Exp.: for 10 contact >> short mesagge cycle time = 10-15 second (result is good)
for 10 contact >> Long message cycle time = 1-3 second (result is error)
How can i fix it?
B4X:
Sub PE_SmsSentStatus (Success As Boolean, ErrorMessage As String, PhoneNumber As String, Intent As Intent)
'Log">>PE_SmsSentStatus> Phn :"&PhoneNumber&"- Er:"&ErrorMessage&" sc:" & Success)
If ayar Then
Dim labelx As Label
labelx=ListView_log.SingleLineLayout.Label
labelx.TextSize=14
ListView_log.AddSingleLine("<<Status :"&PhoneNumber &" ("&Success&") Error:"&ErrorMessage&"-")
End If
If Success Then
SMS_Sent_Durum_guncelle(True,PhoneNumber)'>> listview refres for send result
siradaki_sms_gonder ' >> this send next contcat in list
Else
'-----------------hata oldu sms de-----------
SMS_Sent_Durum_guncelle(False,PhoneNumber) '>> listview refres for send result
siradaki_sms_gonder ' >> this send next contcat in list
End If
End Sub
B4X:
Sub PE_SmsDelivered (PhoneNumber As String, Intent As Intent)
'Log">>PE_SmsDelivered > Phn :"&PhoneNumber)
If ayar Then
Dim labelx As Label
labelx=ListView_log.SingleLineLayout.Label
labelx.TextSize=14
ListView_log.AddSingleLine("<<Delivered :"&PhoneNumber&"-")
End If
''Log"-2------------ SMS delivered---------")
ekran_listeden_sil(PhoneNumber)
Dim i As Int=0
Dim Guncel_yap As Rbr'= Giden_Rehber.Get(i)' gelen kayıtlardan seçildi.
Do Until Giden_Rehber.Size=i 'Or Guncel_yap.sec_telf=PhoneNumber
Guncel_yap = Giden_Rehber.Get(i)' gelen kayıtlardan seçildi.
If Guncel_yap.sec_telf=PhoneNumber Then
Guncel_yap.iletim_durumu=4
Giden_Rehber.RemoveAt(i)
Giden_Rehber.Add(Guncel_yap) ' sending list refresh
ListView_gonderi.AddTwoLinesAndBitmap2(Guncel_yap.isim,"Okundu",LoadBitmap(File.DirAssets,"ok_sms.png"),Guncel_yap.sec_telf)
DoEvents
ListView_gonderi.SetSelection(ListView_gonderi.Size)
DoEvents
Exit
End If
i=i+1
Loop
End Sub
B4X:
'-------------------- SMS SEND CODE ------------------
' I added >> Process_Globals
' Dim Psms As PhoneSms
' Dim PE As PhoneEvents
' Dim PhoneId As PhoneId
'------------------------------------------------
Sub SendSMS(Message As Map, id As Int)
Dim Extra As Map
If ayar Then Log("SEND SMS :"&Message.Get("to"))
Psms.Send2(Message.Get("to"),Message.Get("message"),True,True)
If ayar Then ListView_log.AddSingleLine(">>SEND :"&Message.Get("to"))
End Sub
This pictures my log for short message
this picture is log for generic failure with short message