Dear Earl,
Realy good work. Thank you for this awesome tool.
Now I'm trying to make a contacts manager tool but when I'm using the below code its take about 9 seconds to just fill a in memory list loading name and id (not list view or no any control) ok! but the real question is how android's contact manager (the built in one) loads just in time I open it name and ID and image in addition to loading it in the control hhhhhh !!!! please help as i went crazy to make it faster but no way
here is my code (I bring it from your fourm )
Public Sub testGetAll2() As List
Dim resolver As ContentResolver
resolver.Initialize("res")
Dim Uri1 As Uri
Uri1.parse("content://com.android.contacts/data")
Dim c As cuContact
c.Initialize
Dim rslt As List
rslt.Initialize
Dim selection As String = "mimetype = ? AND data1 <> ? "
Dim crsr As Cursor = resolver.query(Uri1,Array As String( "contact_id","display_name","data1"),selection, Array As String("vnd.android.cursor.item/name", "null"), "")
For x= 0 To crsr.RowCount-1
crsr.Position=x
c.Id=crsr.GetString2(0)
c.DisplayName=crsr.GetString2(1)
rslt.Add(c)
Next
Return rslt
End Sub
Realy good work. Thank you for this awesome tool.
Now I'm trying to make a contacts manager tool but when I'm using the below code its take about 9 seconds to just fill a in memory list loading name and id (not list view or no any control) ok! but the real question is how android's contact manager (the built in one) loads just in time I open it name and ID and image in addition to loading it in the control hhhhhh !!!! please help as i went crazy to make it faster but no way
here is my code (I bring it from your fourm )
Public Sub testGetAll2() As List
Dim resolver As ContentResolver
resolver.Initialize("res")
Dim Uri1 As Uri
Uri1.parse("content://com.android.contacts/data")
Dim c As cuContact
c.Initialize
Dim rslt As List
rslt.Initialize
Dim selection As String = "mimetype = ? AND data1 <> ? "
Dim crsr As Cursor = resolver.query(Uri1,Array As String( "contact_id","display_name","data1"),selection, Array As String("vnd.android.cursor.item/name", "null"), "")
For x= 0 To crsr.RowCount-1
crsr.Position=x
c.Id=crsr.GetString2(0)
c.DisplayName=crsr.GetString2(1)
rslt.Add(c)
Next
Return rslt
End Sub