can anyone explain what the use of the parameters 3 and 4 in managedQuery while using content providers.
Thanks in advance.

i saw this site (

but i am not clear with the 3 rd and 4th parameters.
Can we use contact name as a selection clause like Contact.Display_NAME+="?" in the 3rd parameter and name (a variable whose value is taken from the edittext field of xml file) in the 4th parameter ?

please help me..

Look at Activity [managedQuery](, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String)) for more info. Quick cut would be as bellow

uri The URI of the content provider to query.
projection List of columns to return.
selection SQL WHERE clause.
selectionArgs The arguments to selection, if any ?s are pesent
sortOrder SQL ORDER BY clause.

PS: Be aware Activity.managedQuery been deprecated and you should ue CursorLoader