Skip to content

android.database.sqlite.SQLiteException: near "GROUP": syntax error in Android 10 #5

Description

@Dnyaneshwar1926

Hey,

I'm facing a loading gallery image in android 10. The same code is working fine for the below versions. Pls check.

Exception:
android.database.sqlite.SQLiteException: near "GROUP": syntax error (code 1 SQLITE_ERROR): , while compiling:
SELECT _id, bucket_display_name, bucket_id, _id, orientation
FROM images
WHERE ((is_pending=0) AND (is_trashed=0) AND (volume_name IN ( 'external_primary' ))) AND ((1) GROUP BY 1,(2))
ORDER BY date_modified DESC

code written :
Cursor cur = contentResolver.query(Media.EXTERNAL_CONTENT_URI, new String[]{"_id", "bucket_display_name", "bucket_id", "_id", "orientation"}, "1) GROUP BY 1,(2", null, "date_modified DESC");

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions