Android Question How to clear or remove SMS history from callLog (Sent and Recieved)

M.LAZ

Active Member
Licensed User
Longtime User
@Erel
Hi All,,
i used this code with reflection to clear Call Logs ,but SMS still in the Log Calls, i need a code to clear all logs calls+sms.

B4X:
Sub DelLogsCalls
Dim r As Reflector
r.Target = r.GetContext
r.Target = r.RunMethod("getContentResolver")
Dim CONTENT_URI As Object = _
   r.GetStaticField("android.provider.CallLog$Calls", "CONTENT_URI")
r.RunMethod4("delete", Array As Object(CONTENT_URI, Null, Null), Array As String("android.net.Uri", "java.lang.String", "[Ljava.lang.String;"))
''You should also add the following permissions:
''AddPermission("android.permission.READ_CONTACTS")
''AddPermission("android.permission.WRITE_CONTACTS")
End Sub
yes i have another question : How to delete all stored contacts & SMS?
 
Last edited:
Top