:icon_clap:
Toaday I had wrote a new llib extends the official phone lib,It has only add the delete function because I did not found this function is the official lib .
here is the code:
the lib and demo src are in the attach zip file!Enjoy it.
Toaday I had wrote a new llib extends the official phone lib,It has only add the delete function because I did not found this function is the official lib .
here is the code:
B4X:
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim a As SmsMessages
Dim Button1 As Button
Dim Button2 As Button
Dim EditText1 As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("123")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button2_Click
Dim id As String
id=EditText1.Text
If id=Null Then Return
If a.deletesms(id) Then
Log("删除短信成功(delete sms ok)")
Else
Log("删除短信失败(delete sms error)")
End If
End Sub
Sub Button1_Click
Dim list1 As List
list1=a.GetAll()
For i=0 To list1.Size-1
Log(list1.Get(i))
Next
End Sub