Limit clause does not work with ContactsProvider on android version 8.1.0Version of SQLite used in Android?How can I check the system version of Android?Limit text length of EditText in AndroidRetrieving Android API version programmaticallyAndroid Min SDK Version vs. Target SDK VersionHow to get the build/version number of your Android application?Get application version programmatically in androidAndroid Sqlite: android.database.sqlite.SQLiteException: aggregate functions are not allowed in the GROUP BY clauseSQLite query no longer works in Android 5.0Android contact query eliminate duplicates

Is using gradient descent for MIP a good idea?

How do EVA suits manage water excretion?

Real mode flat model

Is there a real-world mythological counterpart to WoW's "kill your gods for power" theme?

Double it your way

Planar regular languages

Is low emotional intelligence associated with right-wing and prejudiced attitudes?

Parallel resistance in electric circuits

Is a suit against a University Dorm for changing policies on a whim likely to succeed (USA)?

What exactly is a marshrutka (маршрутка)?

Which is the current decimal separator?

Interaction between Teferi Time Raveler and Enduring Ideal

Can druids change their starting cantrips each day?

Why did they ever make smaller than full-frame sensors?

Would it be unbalanced to increase Wild Shape uses based on level?

Asked to Not Use Transactions and to Use A Workaround to Simulate One

simjacker: which SIMs are vulnerable?

If I want an interpretable model, are there methods other than Linear Regression?

What are uses of the byte after BRK instruction on 6502?

How would you control supersoldiers in a late iron-age society?

Output a Super Mario Image

What are examples of experiments or studies where pre-registration would not be feasible?

Does a succubus' charm end when it dies?

The Planck constant for mathematicians



Limit clause does not work with ContactsProvider on android version 8.1.0


Version of SQLite used in Android?How can I check the system version of Android?Limit text length of EditText in AndroidRetrieving Android API version programmaticallyAndroid Min SDK Version vs. Target SDK VersionHow to get the build/version number of your Android application?Get application version programmatically in androidAndroid Sqlite: android.database.sqlite.SQLiteException: aggregate functions are not allowed in the GROUP BY clauseSQLite query no longer works in Android 5.0Android contact query eliminate duplicates






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















The following query works for other devices except for version 8.1.0. I have matched Sqlite3 version of both phones and they matches. What can possibly be wrong with this query.



 val idColumn = ContactsContract.Contacts._ID
val nameColumn = ContactsContract.Contacts.DISPLAY_NAME
val hasNumberColumn = ContactsContract.Contacts.HAS_PHONE_NUMBER
val photoUriColumn = ContactsContract.Contacts.PHOTO_URI

val selection = "$hasNumberColumn = ? AND $nameColumn LIKE ? "
val selectionArgs = arrayOf("1", "%$query%")
val sortOrder = " UPPER($nameColumn) ASC LIMIT $dbLimit OFFSET $dbOffset)"


val cursor = ctx.contentResolver.query(
ContactsContract.Contacts.CONTENT_URI,
arrayOf(idColumn, nameColumn, hasNumberColumn, photoUriColumn),
selection, selectionArgs, sortOrder)









share|improve this question
































    0















    The following query works for other devices except for version 8.1.0. I have matched Sqlite3 version of both phones and they matches. What can possibly be wrong with this query.



     val idColumn = ContactsContract.Contacts._ID
    val nameColumn = ContactsContract.Contacts.DISPLAY_NAME
    val hasNumberColumn = ContactsContract.Contacts.HAS_PHONE_NUMBER
    val photoUriColumn = ContactsContract.Contacts.PHOTO_URI

    val selection = "$hasNumberColumn = ? AND $nameColumn LIKE ? "
    val selectionArgs = arrayOf("1", "%$query%")
    val sortOrder = " UPPER($nameColumn) ASC LIMIT $dbLimit OFFSET $dbOffset)"


    val cursor = ctx.contentResolver.query(
    ContactsContract.Contacts.CONTENT_URI,
    arrayOf(idColumn, nameColumn, hasNumberColumn, photoUriColumn),
    selection, selectionArgs, sortOrder)









    share|improve this question




























      0












      0








      0








      The following query works for other devices except for version 8.1.0. I have matched Sqlite3 version of both phones and they matches. What can possibly be wrong with this query.



       val idColumn = ContactsContract.Contacts._ID
      val nameColumn = ContactsContract.Contacts.DISPLAY_NAME
      val hasNumberColumn = ContactsContract.Contacts.HAS_PHONE_NUMBER
      val photoUriColumn = ContactsContract.Contacts.PHOTO_URI

      val selection = "$hasNumberColumn = ? AND $nameColumn LIKE ? "
      val selectionArgs = arrayOf("1", "%$query%")
      val sortOrder = " UPPER($nameColumn) ASC LIMIT $dbLimit OFFSET $dbOffset)"


      val cursor = ctx.contentResolver.query(
      ContactsContract.Contacts.CONTENT_URI,
      arrayOf(idColumn, nameColumn, hasNumberColumn, photoUriColumn),
      selection, selectionArgs, sortOrder)









      share|improve this question
















      The following query works for other devices except for version 8.1.0. I have matched Sqlite3 version of both phones and they matches. What can possibly be wrong with this query.



       val idColumn = ContactsContract.Contacts._ID
      val nameColumn = ContactsContract.Contacts.DISPLAY_NAME
      val hasNumberColumn = ContactsContract.Contacts.HAS_PHONE_NUMBER
      val photoUriColumn = ContactsContract.Contacts.PHOTO_URI

      val selection = "$hasNumberColumn = ? AND $nameColumn LIKE ? "
      val selectionArgs = arrayOf("1", "%$query%")
      val sortOrder = " UPPER($nameColumn) ASC LIMIT $dbLimit OFFSET $dbOffset)"


      val cursor = ctx.contentResolver.query(
      ContactsContract.Contacts.CONTENT_URI,
      arrayOf(idColumn, nameColumn, hasNumberColumn, photoUriColumn),
      selection, selectionArgs, sortOrder)






      android sqlite kotlin android-contentprovider android-contacts






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 11 at 7:49







      mallaudin

















      asked Mar 28 at 10:55









      mallaudinmallaudin

      2,2933 gold badges22 silver badges46 bronze badges




      2,2933 gold badges22 silver badges46 bronze badges

























          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55395827%2flimit-clause-does-not-work-with-contactsprovider-on-android-version-8-1-0%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.




















          draft saved

          draft discarded















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55395827%2flimit-clause-does-not-work-with-contactsprovider-on-android-version-8-1-0%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해