Giter Club home page Giter Club logo

Comments (11)

jaiselrahman avatar jaiselrahman commented on June 2, 2024 4

For now it is best to opt out of Scoped Storage feature.

<manifest ... >
  <!-- This attribute is "false" by default on apps targeting
       Android 10 or higher. -->
  <application android:requestLegacyExternalStorage="true" ... >
    ...
  </application>
</manifest>

Adding support for Scoped Storage may require breaking changes since

  • We can't access documents directly from Mediastore, need to use Storage Access Framework
  • DATA column is deprecated which is used to ignored files

Support will be added in upcoming releases. Any contributions are welcome.

from filepicker.

jaiselrahman avatar jaiselrahman commented on June 2, 2024 1

I am working on the fix, you can check it out here https://github.com/jaiselrahman/FilePicker/tree/feature/api29_support
or use the following dependency

implementation 'com.github.jaiselrahman:FilePicker:feature~api29_support-SNAPSHOT'

from filepicker.

enriqueg avatar enriqueg commented on June 2, 2024 1

It is working now, such fantastic work, amazing!

from filepicker.

jaiselrahman avatar jaiselrahman commented on June 2, 2024 1

Android 10 support has been added in version 1.3.0. Change log is here.

from filepicker.

enriqueg avatar enriqueg commented on June 2, 2024

It is a great fix, but then crashing here:

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' ))) 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(ContentProviderProxy.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:12)
at com.jaiselrahman.filepicker.loader.FileLoaderCallback.onCreateLoader(FileLoaderCallback.java:6)
at android.app.LoaderManagerImpl.createLoader(LoaderManagerImpl.java:564)
at android.app.LoaderManagerImpl.createAndInstallLoader(LoaderManagerImpl.java:573)
at android.app.LoaderManagerImpl.initLoader(LoaderManagerImpl.java:627)
at com.jaiselrahman.filepicker.loader.FileLoader.loadFiles(FileLoader.java:5)
at com.jaiselrahman.filepicker.activity.FilePickerActivity.b(FilePickerActivity.java:7)
at com.jaiselrahman.filepicker.activity.FilePickerActivity.onCreate(FilePickerActivity.java:30)
at android.app.Activity.performCreate(Activity.java:7802)
at android.app.Activity.performCreate(Activity.java:7791)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)
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(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

from filepicker.

enriqueg avatar enriqueg commented on June 2, 2024

Very much appreciated, it is a great library! I will test this!

from filepicker.

neerajemorphis avatar neerajemorphis commented on June 2, 2024

Not working on Android 10 :(
I am using 1.3.2 version of FilePicker, still returning null with getPath(), and getUri() won't work for me as expected, as I need the path only

from filepicker.

IrshadAndroid avatar IrshadAndroid commented on June 2, 2024

use android:requestLegacyExternalStorage="true" in your project

from filepicker.

MahmoudMabrok avatar MahmoudMabrok commented on June 2, 2024

even after i add android:requestLegacyExternalStorage="true"
issue still exist we can not get "Path"

from filepicker.

msyafa avatar msyafa commented on June 2, 2024

android:requestLegacyExternalStorage="true" has been added and am using com.github.jaiselrahman:FilePicker:1.4.0-alpha01, but it still gives me the following exception on android 10:

Unable to start activity ComponentInfo{/com.jaiselrahman.filepicker.activity.FilePickerActivity}: android.database.sqlite.SQLiteException: near "GROUP": syntax error (code 1 SQLITE_ERROR): , while compiling: SELECT _data FROM files WHERE ((owner_package_name IN ( 'com.ms.palladium' ) OR media_type=2 OR media_type=4 OR media_type=0 AND mime_type LIKE 'audio/%' OR media_type=3 OR media_type=0 AND mime_type LIKE 'video/%' OR media_type=1 OR media_type=0 AND mime_type LIKE 'image/%') AND (is_pending=0) AND (is_trashed=0) AND (volume_name IN ( 'external_primary' )) AND (invalid=0)) AND ((bucket_id IS NOT NULL) GROUP BY (bucket_id)) ORDER BY _data ASC

from filepicker.

Rahmath22 avatar Rahmath22 commented on June 2, 2024
 Caused by: android.database.sqlite.SQLiteException: near "GROUP": syntax error (code 1 SQLITE_ERROR): , while compiling: SELECT _data FROM files WHERE ((owner_package_name IN ( 'com.photo.photoframe' ) OR media_type=2 OR media_type=4 OR media_type=0 AND mime_type LIKE 'audio/%' OR media_type=3 OR media_type=0 AND mime_type LIKE 'video/%' OR media_type=1 OR media_type=0 AND mime_type LIKE 'image/%') AND (is_pending=0) AND (is_trashed=0) AND (volume_name IN ( 'external_primary' ))) AND ((bucket_id IS NOT NULL) GROUP BY (bucket_id)) ORDER BY _data ASC

How can we fix this issue?

from filepicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.