how add limit clause to manageQuery on android

前端 未结 5 1896
没有蜡笔的小新
没有蜡笔的小新 2021-02-10 03:00

Android\'s API provides a clean mechanism via SQLite to make queries into the contact list. However, I am not sure how to limit the results:

Cursor cur = ((Acti         


        
5条回答
  •  生来不讨喜
    2021-02-10 03:19

    Actually, depending on the provider you can append a limit to the URI as follows:

    uri.buildUpon().appendQueryParameter("limit", "40").build()
    

    I know the MediaProvider handles this and from looking at recent code it seems you can do it with contacts too.

提交回复
热议问题