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;
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)
add a comment
|
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)
add a comment
|
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)
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)
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
add a comment
|
add a comment
|
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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