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 (http://app-solut.com/blog/2011/03/working-with-the-contactscontract-to-query-contacts-in-android/)

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](http://developer.android.com/reference/android/app/Activity.html#managedQuery(android.net.Uri, 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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.