jaiselrahman / FilePicker

FilePicker library for Android
Apache License 2.0
238 stars 70 forks source link

This library Not working on android 10 #43

Closed AnwarSamir closed 5 years ago

AnwarSamir commented 5 years ago
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: sa.waqood.labonclickjava, PID: 12002
    java.lang.RuntimeException: Unable to start activity ComponentInfo{sa.waqood.labonclickjava/com.jaiselrahman.filepicker.activity.FilePickerActivity}: android.database.sqlite.SQLiteException: near "GROUP": syntax error (code 1 SQLITE_ERROR): , while compiling: SELECT _data FROM files WHERE ((is_pending=0) AND (is_trashed=0) AND (volume_name IN ( 'external_primary' , '1009-281e' ))) AND ((bucket_id IS NOT NULL) GROUP BY (bucket_id)) ORDER BY _data ASC
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
     Caused by: android.database.sqlite.SQLiteException: near "GROUP": syntax error (code 1 SQLITE_ERROR): , while compiling: SELECT _data FROM files WHERE ((is_pending=0) AND (is_trashed=0) AND (volume_name IN ( 'external_primary' , '1009-281e' ))) AND ((bucket_id IS NOT NULL) GROUP BY (bucket_id)) ORDER BY _data ASC
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:184)
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140)
        at android.content.ContentProviderProxy.query(ContentProviderNative.java:423)
        at android.content.ContentResolver.query(ContentResolver.java:944)
        at android.content.ContentResolver.query(ContentResolver.java:880)
        at android.content.ContentResolver.query(ContentResolver.java:836)
        at com.jaiselrahman.filepicker.loader.FileLoader.getFoldersToIgnore(FileLoader.java:145)
        at com.jaiselrahman.filepicker.loader.FileLoader.<init>(FileLoader.java:119)
        at com.jaiselrahman.filepicker.loader.FileLoaderCallback.onCreateLoader(FileLoaderCallback.java:63)
        at android.app.LoaderManagerImpl.createLoader(LoaderManager.java:564)
        at android.app.LoaderManagerImpl.createAndInstallLoader(LoaderManager.java:573)
        at android.app.LoaderManagerImpl.initLoader(LoaderManager.java:627)
        at com.jaiselrahman.filepicker.loader.FileLoader.loadFiles(FileLoader.java:179)
        at com.jaiselrahman.filepicker.activity.FilePickerActivity.loadFiles(FilePickerActivity.java:128)
        at com.jaiselrahman.filepicker.activity.FilePickerActivity.onCreate(FilePickerActivity.java:115)
        at android.app.Activity.performCreate(Activity.java:7802)
        at android.app.Activity.performCreate(Activity.java:7791)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) 
        at android.os.Handler.dispatchMessage(Handler.java:107) 
        at android.os.Looper.loop(Looper.java:214) 
        at android.app.ActivityThread.main(ActivityThread.java:7356) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 
E/UncaughtException: java.lang.RuntimeException: Unable to start activity ComponentInfo{sa.waqood.labonclickjava/com.jaiselrahman.filepicker.activity.FilePickerActivity}: android.database.sqlite.SQLiteException: near "GROUP": syntax error (code 1 SQLITE_ERROR): , while compiling: SELECT _data FROM files WHERE ((is_pending=0) AND (is_trashed=0) AND (volume_name IN ( 'external_primary' , '1009-281e' ))) AND ((bucket_id IS NOT NULL) GROUP BY (bucket_id)) ORDER BY _data ASC
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
     Caused by: android.database.sqlite.SQLiteException: near "GROUP": syntax error (code 1 SQLITE_ERROR): , while compiling: SELECT _data FROM files WHERE ((is_pending=0) AND (is_trashed=0) AND (volume_name IN ( 'external_primary' , '1009-281e' ))) AND ((bucket_id IS NOT NULL) GROUP BY (bucket_id)) ORDER BY _data ASC
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:184)
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140)
        at android.content.ContentProviderProxy.query(ContentProviderNative.java:423)
        at android.content.ContentResolver.query(ContentResolver.java:944)
        at android.content.ContentResolver.query(ContentResolver.java:880)
        at android.content.ContentResolver.query(ContentResolver.java:836)
        at com.jaiselrahman.filepicker.loader.FileLoader.getFoldersToIgnore(FileLoader.java:145)
        at com.jaiselrahman.filepicker.loader.FileLoader.<init>(FileLoader.java:119)
        at com.jaiselrahman.filepicker.loader.FileLoaderCallback.onCreateLoader(FileLoaderCallback.java:63)
        at android.app.LoaderManagerImpl.createLoader(LoaderManager.java:564)
        at android.app.LoaderManagerImpl.createAndInstallLoader(LoaderManager.java:573)
        at android.app.LoaderManagerImpl.initLoader(LoaderManager.java:627)
        at com.jaiselrahman.filepicker.loader.FileLoader.loadFiles(FileLoader.java:179)
        at com.jaiselrahman.filepicker.activity.FilePickerActivity.loadFiles(FilePickerActivity.java:128)
        at com.jaiselrahman.filepicker.activity.FilePickerActivity.onCreate(FilePickerActivity.java:115)
        at android.app.Activity.performCreate(Activity.java:7802)
        at android.app.Activity.performCreate(Activity.java:7791)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) 
        at android.os.Handler.dispatchMessage(Handler.java:107) 
        at android.os.Looper.loop(Looper.java:214) 
        at android.app.ActivityThread.main(ActivityThread.java:7356) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 
jaiselrahman commented 5 years ago

Yes, for now the library won't work as intended in android 10. I will fix it as soon as I can. Any pull request and suggestions are appreciated.

jaiselrahman commented 5 years ago

Closing this issue as there is already an similar issue #40.

psaritalog commented 3 years ago

how you solve this issue