FilePicker library for Android

Overview

FilePicker Library for Android

License API jitPack Monthly Downloads Weekly Downloads Android Arsenal

A FilePicker library for Android for selecting multiple types of files and also to capture Images and Videos.

Sample Apk

Note

Screenshots

pic

Usage

Step 1: Add it in your root build.gradle at the end of repositories

    allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }

Step 2: Add the dependency

    dependencies {
        ...
        implementation 'com.github.jaiselrahman:FilePicker:1.3.2'
    }

Step 3: Start FilePickerActivity using startActivityForResult(...).

    Intent intent = new Intent(this, FilePickerActivity.class);
    startActivityForResult(intent, FILE_REQUEST_CODE);

Step 4: Receive results in onActivityResult(...).

    case FILE_REQUEST_CODE:
        ArrayList<MediaFile> files = data.getParcelableArrayListExtra(FilePickerActivity.MEDIA_FILES);
        //Do something with files
        break;

Configuration

The FilePickerActivity can be configured by using Configurations.Builder methods

Example

    intent.putExtra(FilePickerActivity.CONFIGS, new Configurations.Builder()
                .setCheckPermission(true)
                .setShowImages(true)
                .enableImageCapture(true)
                .setMaxSelection(10)
                .setSkipZeroSizeFiles(true)
                .build());

Builder Methods

Methods Default value Uses
setShowImages(boolean) true Whether to load Images files
setShowVideos(boolean) true Whether to load Videos files
setShowAudios(boolean) false Whether to load Audio files
setShowFiles(boolean) false Whether to load Files for given suffixes
enableImageCapture(boolean) false Enables camera for capturing of images
enableVideoCapture(boolean) false Enables camera for capturing of videos
setCheckPermission(boolean) false Whether to request permissions on runtime for API >= 23 if not granted
setSuffixes(String...) "txt", "pdf", "html", "rtf", "csv", "xml",
"zip", "tar", "gz", "rar", "7z","torrent",
"doc", "docx", "odt", "ott",
"ppt", "pptx", "pps",
"xls", "xlsx", "ods", "ots"
Suffixes for file to be loaded, overrides default value
setMaxSelection(int) -1 Maximum no of items to be selected, -1 for no limits
setSingleChoiceMode(boolean) false Can select only one file, overrides setMaxSelection(int)
use setSelectedMediaFile(MediaFile) to set default selection
setSelectedMediaFile(MediaFile) null Default file selection in singleChoiceMode
setSelectedMediaFiles(ArrayList<MediaFile>) null Default files to be marked as selected
setSingleClickSelection(boolean) true Start selection mode on single click else on long click
setSkipZeroSizeFiles(boolean) true Whether to load zero byte sized files
setLandscapeSpanCount(int) 5 Grid items in landscape mode
setPortraitSpanCount(int) 3 Grid items in portrait mode
setImageSize(int) Screen width/portraitSpanCount Size of height, width of image to be loaded in Px
setRootPath(String) External storage Set custom directory path to load files from
setIgnorePaths(String... ignorePaths) null Regex patterns of paths to ignore
setIgnoreNoMedia(boolean) true Whether to ignore .nomedia file
setIgnoreHiddenFile(boolean) true Whether to ignore hidden file

MediaFile methods

Method Description
long getId() Id of the file in MediaStore database
String getName() Name of file without suffix
String getPath() Absolute path of the file
long getSize() Size of the file
long getDate() Date when file is added to MediaStore database
String getMimeType() Mime type of the file
int getMediaType() One of TYPE_FILE, TYPE_IMAGE, TYPE_AUDIO, TYPE_VIDEO
long getDuration() Duration of Audio, Video files in ms, else 0
Uri getThumbnail() Album Art of Audio files
long getHeight() Height of Image, Video files in Px for API>=16, else 0
long getWidth() Width of Image, Video files in Px for API>=16, else 0
String getBucketId() Id of Parent Directory in MediaStore database
String getBucketName() Name of Parent Directory

Contributions

Feel free to contribute to this project. Before creating issues or pull request please take a look at following templates.

Credits

License

Copyright (c) 2018, Jaisel Rahman

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • MediaFile with empty name after upgrade to 1.3.0 version

    MediaFile with empty name after upgrade to 1.3.0 version

    Describe the bug After upgrading to 1.3.0 version, mediaFiles returned from FilePicker Activity have null as name attribut. Also, files shown in the file picker without name. (see the screenshots)

    To Reproduce Steps to reproduce the behavior:

    1. upgrade to 1.3.0
    2. choose file
    3. mediaFile.name -> is null

    Screenshots Version 1.2.2: Screenshot_1574763107

    Version 1.3.0: Screenshot_1574762681

    Android info (please complete the following information):

    • Emulator & One plus 6
    • API 29 / API 28
    opened by H-Mezri 22
  • Manifest merger failed

    Manifest merger failed

    Describe the bug I received this bug when import the module from gradle.

    Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
    	is also present at [androidx.core:core:1.1.0-alpha04] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
    	Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:14:5-45:19 to override.
    

    It seems this module use AndroidX in developing. Does there is a way to use this module without AndroidX ?

    I have read the similar issue #22.
    But the solution is not suitable to me.

    To Reproduce Steps to reproduce the behavior:

    1. Add jaiselrahman:FilePicker to project
    dependencies {
        implementation 'com.github.jaiselrahman:FilePicker:1.2.2'
    }
    
    1. Try build code to phone

    Expected behavior A clear and concise description of what you expected to happen.

    Screenshots Here is the merged Manifest.

    Screen Shot 2019-04-23 at 3 14 52 PM

    Here is my project's build.gradle file

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    
    buildscript {
        ext.kotlin_version = '1.3.30'
        repositories {
            google()
            jcenter()
            maven { url 'https://jitpack.io' }
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.4.0'
            classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        }
    }
    
    allprojects {
        repositories {
            google()
            jcenter()
        }
    }
    
    task clean(type: Delete) {
        delete rootProject.buildDir
    }
    

    Here is my app's build.gradle file

    apply plugin: 'com.android.application'
    apply plugin: 'kotlin-android'
    apply plugin: 'kotlin-android-extensions'
    apply plugin: 'kotlin-kapt'
    
    allprojects {
        repositories {
            maven { url 'https://jitpack.io' }
        }
    }
    
    android {
        compileSdkVersion 28
        defaultConfig {
            applicationId "......................."
            minSdkVersion 21
            targetSdkVersion 28
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    buildscript {
        ext.supportLibraryVersion = '28.0.0'
        ext.butterknifeVersion = '8.8.1'
        ext.glideVersion = '4.7.1'
        ext.jdeferredVersion = '2.0.0-beta1'
    }
    
    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
        implementation 'com.android.support:appcompat-v7:28.0.0'
        implementation "com.android.support:appcompat-v7:$supportLibraryVersion"
        implementation "com.android.support:support-v4:$supportLibraryVersion"
        implementation "com.android.support:design:$supportLibraryVersion"
        implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    
        implementation "com.jakewharton:butterknife:$butterknifeVersion"
        kapt "com.jakewharton:butterknife-compiler:$butterknifeVersion"
    
        implementation 'io.reactivex.rxjava2:rxkotlin:2.2.0'
        implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
    
        implementation 'org.immutables:gson:2.7.1'
        implementation 'com.squareup.okhttp3:okhttp:3.12.0'
        implementation 'com.github.bumptech.glide:okhttp3-integration:4.9.0'
        implementation "com.github.bumptech.glide:glide:$glideVersion"
        kapt "com.github.bumptech.glide:compiler:$glideVersion"
    
        implementation 'com.github.jaiselrahman:FilePicker:1.2.2'
    
        implementation "org.jdeferred.v2:jdeferred-core:$jdeferredVersion"
        implementation "org.jdeferred.v2:jdeferred-android:$jdeferredVersion"
        
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'com.android.support.test:runner:1.0.2'
        androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    }
    

    Android info (please complete the following information):

    • Device/Emulator Nexus 5X (Android 8.1.0)
    • API level 27
    opened by j796160836 15
  • NullPointerException when saving captured photo

    NullPointerException when saving captured photo

    After updating to version 1.04 and solving #1 issue, when I take a photo and press the check icon I get:

    java.lang.RuntimeException: Unable to resume activity {my.package/com.jaiselrahman.filepicker.activity.FilePickerActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { }} to activity {my.package/com.jaiselrahman.filepicker.activity.FilePickerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference

    To Reproduce Steps to reproduce the behavior:

    1. Open the picker activity
    2. Select the capture photo icon
    3. Capture a photo
    4. Click the check icon
    5. The exception is thrown

    Android info:

    • Device: Samsung Galaxy S4
    • API level 25
    help wanted 
    opened by jfpedroza 12
  • Support for API 29 (Android 10)

    Support for API 29 (Android 10)

    I'm getting an SQLiteException when starting FilePickerActivity on a device with API 29. On API 28 it works fine. There is a similar issue for another library.
    Device: Android Studio emulator with android 10.0 Lib ver.: 1.2.2 App uses the latest AndroidX libs. compileSdkVersion is 29

    I'm starting activity like this:

    Intent intent = new Intent(getActivity(), FilePickerActivity.class);
                                    intent.putExtra(FilePickerActivity.CONFIGS, new Configurations.Builder()
                                            .setCheckPermission(true)
                                            .setMaxSelection(1)
                                            .setShowAudios(false)
                                            .setShowImages(false)
                                            .setShowVideos(false)
                                            .setShowFiles(true)
                                            .setSuffixes("doc", "docx", "xls", "xlsx")
                                            .build());
                                    startActivityForResult(intent, REQUEST_CODE_CHOOSE_FILE);
    

    Logcat:

    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.example/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.android.example' ) 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' , '1005-1207' ))) 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 ((owner_package_name IN ( 'com.android.example' ) OR media_type=2 OR media_type=4 OR media_type=0 AND mime_type LIKE 'anaudio/%' 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' , '1005-1207' ))) 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)
    
    enhancement help wanted 
    opened by mkruglikov 11
  • No way to get file path.

    No way to get file path.

    As in the latest build 1.3.2 , getPath is deprecated, and we now have to use getUri but, in order to get the file path from uri , none of the methods available on internet works. So whats the way to get the file path.

    opened by carotkut94 10
  • java.lang.RuntimeException: Manifest merger failed with multiple errors

    java.lang.RuntimeException: Manifest merger failed with multiple errors

    Hi I implement your plugin but when I try to run I get this error

    java.lang.RuntimeException: Manifest merger failed with multiple errors, see logs
    	at com.android.builder.core.AndroidBuilder.mergeManifestsForApplication(AndroidBuilder.java:556)
    	at com.android.build.gradle.tasks.ProcessApplicationManifest.doFullTaskAction(ProcessApplicationManifest.java:198)
    	at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:106)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
    	at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50)
    	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
    	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
    	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
    	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120)
    	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99)
    	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
    	at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
    	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
    	at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
    	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
    	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
    	at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
    	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
    	at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
    	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
    	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
    	at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
    	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
    	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
    	at org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42)
    	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:277)
    	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:262)
    	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135)
    	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130)
    	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200)
    	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191)
    	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130)
    	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:74)
    	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.execute(DefaultTaskExecutionGraph.java:143)
    	at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:40)
    	at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:40)
    	at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:24)
    	at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:46)
    	at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:49)
    	at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:40)
    	at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:33)
    	at org.gradle.initialization.DefaultGradleLauncher$ExecuteTasks.run(DefaultGradleLauncher.java:355)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
    	at org.gradle.initialization.DefaultGradleLauncher.runTasks(DefaultGradleLauncher.java:219)
    	at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
    	at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:124)
    	at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:77)
    	at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:74)
    	at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:154)
    	at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:38)
    	at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:96)
    	at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:74)
    	at org.gradle.tooling.internal.provider.runner.ClientProvidedBuildActionRunner.run(ClientProvidedBuildActionRunner.java:68)
    	at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    	at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    	at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
    	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.run(RunAsBuildOperationBuildActionRunner.java:50)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
    	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:45)
    	at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51)
    	at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:47)
    	at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:44)
    	at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:79)
    	at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:44)
    	at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
    	at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39)
    	at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25)
    	at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80)
    	at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53)
    	at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:62)
    	at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:34)
    	at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
    	at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
    	at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
    	at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
    	at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:59)
    	at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
    	at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59)
    	at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44)
    	at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:46)
    	at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30)
    	at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
    	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    	at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    	at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    	at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
    	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
    	at org.gradle.util.Swapper.swap(Swapper.java:38)
    	at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    	at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    	at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62)
    	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    	at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:81)
    	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    	at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
    	at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295)
    	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    	at java.lang.Thread.run(Thread.java:745)
    
    
    

    Plese help me to fix this issue

    opened by anehkumar 8
  • Can't call FilePickerActivity

    Can't call FilePickerActivity

    FilePickerActivity shows blank white page activity Steps to reproduce the behavior:

    1. Image Button press
    2. Successfully go to another activity, But it shows blank white activity instead of filepicker
    opened by dawnpeace 7
  • NullPointerException when discarding captured photo

    NullPointerException when discarding captured photo

    I don't know if this is related to #4 so I just created a different issue:

    After updating to version 1.04 and solving #1 issue, when I take a photo and press the cross icon I get:

    java.lang.RuntimeException: Unable to resume activity {my.package/com.jaiselrahman.filepicker.activity.FilePickerActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=0, data=Intent { }} to activity {my.package/com.jaiselrahman.filepicker.activity.FilePickerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.io.File.delete()' on a null object reference

    To Reproduce Steps to reproduce the behavior:

    1. Open the picker activity
    2. Select the capture photo icon
    3. Capture a photo
    4. Click the cross icon
    5. The exception is thrown

    Android info:

    • Device: Samsung Galaxy S4
    • API level 25
    opened by jfpedroza 6
  • No Files are shown if i set only the showFiles method to true

    No Files are shown if i set only the showFiles method to true

    • I tried to open files(pdf,doc,docx), so i set the image,video and audio to false but no files are shown but if you enalbe video or image the files are included.

    To Reproduce Steps to reproduce the behavior:

    1. set image,video and audio to false and files is set to true
    2. set the suffixes to pdf,doc and docx
    3. start the filepicker activity
    4. no files are shown even if it exists.

    Expected behavior Files must be shown.

    Android info (please complete the following information):

    • Xiaomi Mi 8
    • API 29

    Additional context Your library is great hope to fix this bug soon. thanks

    opened by dn0myaraymond 4
  • FilePickerActivity shows empty when RootPath is set.

    FilePickerActivity shows empty when RootPath is set.

    Describe the bug When I set a rootPath in the configurations builder, FilePickerActivity doesn't show any files.

    To Reproduce Steps to reproduce the behavior:

    1. Set a path with setRootPath method in the configurations builder.

    Here's my configurations builder:

    Configurations configurations = new Configurations.Builder()
                        .setRootPath(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES).getPath())
                        .setCheckPermission(true)
                        .setShowImages(false)
                        .setShowVideos(true)
                        .setSkipZeroSizeFiles(true)
                        .setMaxSelection(10)
                        .build();
    

    Expected behavior Show the desired files on the specific path.

    Android info (please complete the following information):

    • Device - LG Q6
    • API 27
    opened by Wasa22 4
  • This library Not working on android 10

    This library Not working on android 10

    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) 
    
    
    opened by AnwarSamir 3
  • ANR when opening FilePickerActivity with a large Data set

    ANR when opening FilePickerActivity with a large Data set

    Describe the bug The App will ANR when calling FilePickerActivity and the OS has 100's of large files.

    To Reproduce Steps to reproduce the behavior:

    1. Create an intent to FilePickerAcitivity
    2. pub extra intent.putExtra( FilePickerActivity.CONFIGS, Configurations.Builder() .setCheckPermission(true) .setShowImages(false) .setShowVideos(true) .enableImageCapture(false) .enableVideoCapture(true) .setMaxSelection(maxSelection) .setSkipZeroSizeFiles(true) .build() )
    3. Start Activity

    Expected behavior The App shows a loading screen or something while waiting for the grid to appear

    ** Actual Behavior ** The App will lock up and Show the ANR dialog. if the user clicks "wait" it will attempt to finish the process. (on my device it took about 20 seconds yes there are alot of files on this device) the App will crash if the user does nothing.

    Android info (please complete the following information):

    • One Plus 8T
    • Pixel 2
    • Samsung Fold
    • any device with lots of files to parse that can not be done in 16ms

    Additional context This is used in a Video Selection application and the UI locks up and ANRs when calling the file picker. This does not happen on a device with only 10s of files. you need a device that has 100s if not 1000s of files ( even if this is not reproducible this should not be doing any File IO or Parsing on the main thread )

    opened by adfwhitestar 1
  • ANR because Class Configuration not found when unmarshalling

    ANR because Class Configuration not found when unmarshalling

    Hello, thanks in advance. I hope this is not a bad configuration in my application, however since i can't find a cause for this to happen i'm sharing with you.

    Describe the bug This issue happened only for two test samples:

    1. Samsung note 10 - Android 11
    2. Xiaomi Mi A2 - Android 10

    I identified the error checking Android logs, as you can see below (That's the log for Samsung note 10 - Android 11)

    12-02 08:44:29.151 1000 1015 3787 I ActivityTaskManager: START u0 {cmp=com.lmi.myapplication/com.jaiselrahman.filepicker.activity.FilePickerActivity (has extras)} from uid 10668 12-02 08:44:29.151 1000 1015 3787 E Parcel : Class not found when unmarshalling: com.jaiselrahman.filepicker.config.Configurations 12-02 08:44:29.151 1000 1015 3787 E Parcel : java.lang.ClassNotFoundException: com.jaiselrahman.filepicker.config.Configurations 12-02 08:44:29.151 1000 1015 3787 E Parcel : at java.lang.Class.classForName(Native Method) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at java.lang.Class.forName(Class.java:454) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at android.os.Parcel.readParcelableCreator(Parcel.java:3350) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at android.os.Parcel.readParcelable(Parcel.java:3284) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at android.os.Parcel.readValue(Parcel.java:3186) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at android.os.Parcel.readArrayMapInternal(Parcel.java:3579) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at android.os.BaseBundle.unparcel(BaseBundle.java:236) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at android.os.BaseBundle.getString(BaseBundle.java:1196) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at android.content.Intent.getStringExtra(Intent.java:8889) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1128) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:894) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1721) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1571) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at com.android.server.wm.ActivityTaskManagerService.startActivity(ActivityTaskManagerService.java:1523) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at android.app.IActivityTaskManager$Stub.onTransact(IActivityTaskManager.java:1671) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at android.os.Binder.execTransactInternal(Binder.java:1190) 12-02 08:44:29.151 1000 1015 3787 E Parcel : at android.os.Binder.execTransact(Binder.java:1159) 12-02 08:44:29.151 1000 1015 3787 E Parcel : Caused by: java.lang.ClassNotFoundException: com.jaiselrahman.filepicker.config.Configurations 12-02 08:44:29.151 1000 1015 3787 E Parcel : ... 18 more 12-02 08:44:29.151 1000 1015 3787 W Bundle : Failed to parse Bundle, but defusing quietly 12-02 08:44:29.151 1000 1015 3787 W Bundle : android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.jaiselrahman.filepicker.config.Configurations 12-02 08:44:29.151 1000 1015 3787 W Bundle : at android.os.Parcel.readParcelableCreator(Parcel.java:3376) 12-02 08:44:29.151 1000 1015 3787 W Bundle : at android.os.Parcel.readParcelable(Parcel.java:3284) 12-02 08:44:29.151 1000 1015 3787 W Bundle : at android.os.Parcel.readValue(Parcel.java:3186) 12-02 08:44:29.151 1000 1015 3787 W Bundle : at android.os.Parcel.readArrayMapInternal(Parcel.java:3579) 12-02 08:44:29.151 1000 1015 3787 W Bundle : at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292) 12-02 08:44:29.151 1000 1015 3787 W Bundle : at android.os.BaseBundle.unparcel(BaseBundle.java:236) 12-02 08:44:29.151 1000 1015 3787 W Bundle : at android.os.BaseBundle.getString(BaseBundle.java:1196) 12-02 08:44:29.151 1000 1015 3787 W Bundle : at android.content.Intent.getStringExtra(Intent.java:8889) 12-02 08:44:29.151 1000 1015 3787 W Bundle : at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1128) 12-02 08:44:29.151 1000 1015 3787 W Bundle : at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:894) 12-02 08:44:29.151 1000 1015 3787 W Bundle : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1721) 12-02 08:44:29.151 1000 1015 3787 W Bundle : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1571) 12-02 08:44:29.151 1000 1015 3787 W Bundle : at com.android.server.wm.ActivityTaskManagerService.startActivity(ActivityTaskManagerService.java:1523) 12-02 08:44:29.151 1000 1015 3787 W Bundle : at android.app.IActivityTaskManager$Stub.onTransact(IActivityTaskManager.java:1671) 12-02 08:44:29.151 1000 1015 3787 W Bundle : at android.os.Binder.execTransactInternal(Binder.java:1190) 12-02 08:44:29.151 1000 1015 3787 W Bundle : at android.os.Binder.execTransact(Binder.java:1159)

    My application crashes because FilePicker can't found Class 'Configurations' in execution time. This problem is reported in the moment that the application starts the FilePickerActivity. Since it can't found Configurations, the intent dies.

    The code i'm using to call FilePicker follows:

    import com.jaiselrahman.filepicker.activity.FilePickerActivity; import com.jaiselrahman.filepicker.config.Configurations; import com.jaiselrahman.filepicker.model.MediaFile;

    ...

    Intent intent = new Intent(MainActivity.this, FilePickerActivity.class); intent.putExtra(FilePickerActivity.CONFIGS, new Configurations.Builder() .setCheckPermission(true) .setShowVideos(true) .setShowImages(false) .setSingleChoiceMode(true) .setSkipZeroSizeFiles(true) .build()); startActivityForResult(intent, REQUEST_SELECT_FILE_INTENT);

    As you can see i'm filtering only for videos and single choice mode. I checked, and the class do exist, obviously.

    My build.gradle:

    dependencies { ... implementation 'com.github.jaiselrahman:FilePicker:1.3.2' }

    To Reproduce Steps to reproduce the behavior:

    1. Try to start FilePicker in one of the samples above.

    Expected behavior FilePicker can found class and run without problems as it happens for many other smartphones.

    Android info (please complete the following information):

    • Physical Devices (Samsung note 10 and Xiaomi Mi A2)
    • buildToolsVersion "29.0.1"
    • minSdkVersion 24
    • targetSdkVersion 29
    opened by rennovale 0
  • 兼容Android 11

    兼容Android 11

    Description

    Motivation and Context

    How Has This Been Tested?

    Screenshots (if appropriate):

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)

    Checklist:

    • [ ] My code follows the code style of this project.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    opened by fuzhengyin 1
  • Not all file is showing for a custom extention

    Not all file is showing for a custom extention

    Describe the bug I'm creating a file with .abc extension the file picker only return one file with the .abc, knowing that i have more then 8 file with .abc in Documents folder.

    To Reproduce File folder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS);

                Intent intent = new Intent(MyActivity.this, FilePickerActivity.class);
                intent.putExtra(FilePickerActivity.CONFIGS, new Configurations.Builder()
                        .setCheckPermission(true)
                        .setShowFiles(true)
                        .setShowAudios(false)
                        .setShowImages(false)
                        .setShowAudios(false)
                        .setMaxSelection(1)
                        .setSuffixes("abc")
                        .setRootPath(folder.getAbsolutePath())
                        .setSkipZeroSizeFiles(true)
                        .build());
    

    Expected behavior I expect to see all my .abc files

    Android info (please complete the following information):

    • Device Samsung
    • android 11

    Additional context Add any other context about the problem here.

    opened by ChadiGSfeir 1
Releases(1.4.0-beta01)
Owner
Jaisel Rahman
Interested in Android and Web development. Loves Programming and Opensource.
Jaisel Rahman
Postman is a reactive One-tap SMS verification library. This library allows the usage of RxJava with The SMS User Consent API

What is Postman? Postman is a reactive One-tap SMS verification library. This library allows the usage of RxJava with The SMS User Consent API Usage P

Cafer Mert Ceyhan 129 Dec 24, 2022
Android Country Picker is a Kotlin-first, flexible and powerful Android library that allows to integrate Country Picker with just a few lines.

1. Add dependency dependencies { implementation 'com.hbb20:android-country-picker:X.Y.Z' } For latest version, 2. Decide your use-case

Harsh B. Bhakta 65 Dec 6, 2022
Android library for swipable gestures

Swipper Android Library for custom views to control brightness , volume and seek through swipable gestures . These views could easily replace the conv

Mobile Development Group 105 Dec 30, 2022
Android Library that lights items for tutorials or walk-throughs etc...

Spotlight Gradle dependencies { implementation 'com.github.takusemba:spotlight:x.x.x' } Usage val spotlight = Spotlight.Builder(this) .setTarg

TakuSemba 3.4k Jan 4, 2023
[] An Android library which allows developers to easily add animations to ListView items

DEPRECATED ListViewAnimations is deprecated in favor of new RecyclerView solutions. No new development will be taking place, but the existing versions

Niek Haarman 5.6k Dec 30, 2022
Android Rubber Picker Library

RubberPicker RubberPicker library contains the RubberSeekBar and RubberRangePicker, inspired by Cuberto's rubber-range-picker. Getting started Setting

Chrisvin Jem 547 Jan 5, 2023
EtsyBlur is an Android library that allows developers to easily add a glass-like blur effect implemented in the Etsy app.

EtsyBlur EtsyBlur is an Android library that allows developers to easily add a glass-like blur effect implemented in the past Etsy app. Try out the sa

Manabu S. 755 Dec 29, 2022
[] Android library for using the Honeycomb animation API on all versions of the platform back to 1.0!

DEPRECATED NineOldAndroids is deprecated. No new development will be taking place. Existing versions will (of course) continue to function. New applic

Jake Wharton 4.5k Jan 9, 2023
Android library. Flexible components for chat UI implementation with flexible possibilities for styling, customizing and data management. Made by Stfalcon

ChatKit for Android ChatKit is a library designed to simplify the development of UI for such a trivial task as chat. It has flexible possibilities for

Stfalcon LLC 3.6k Jan 5, 2023
An Android library which provides simple Item animations to RecyclerView items

RecyclerViewItemAnimators Library Travis master: This repo provides: Appearance animations Simple animators for the item views Quick start You can now

Gabriele Mariotti 3.1k Dec 16, 2022
Library containing common animations needed for transforming ViewPager scrolling for Android v13+.

ViewPagerTransforms Library containing common animations needed for transforming ViewPager scrolling on Android v13+. This library is a rewrite of the

Ian Thomas 2.5k Dec 29, 2022
Android library to animate Floating Action Button to Bottom Sheet Dialog and vice-versa

FabulousFilter Show some ❤️ and star the repo to support the project This library is the implementation of filter-concept posted on MaterialUp.com. It

Krupen Ghetiya 2.6k Jan 3, 2023
Android library to control Transition animates. A simple way to create a interactive animation.

TransitionPlayer Android library to control Transition animates. A simple way to create a interactive animation. Demo1 SimpleTransition Code: ....

林法鑫 1.2k Dec 17, 2022
Road Runner is a library for android which allow you to make your own loading animation using a SVG image

Road Runner Road Runner is a library for android which allow you to make your own loading animation using a SVG image Sample video View in Youtube Dem

Adrián Lomas 1.2k Nov 18, 2022
FPSAnimator is very easy animation library for Android TextureView and SurfaceView.

FPSAnimator A simple but powerful Tween / SpriteSheet / ParabolicMotion / animation library for Android TextureView and SurfaceView. Features The cont

Masayuki Suda 756 Dec 30, 2022
Android library for material scrolling techniques.

material-scrolling Android library for material scrolling techniques. Features Easily implement material scrolling techniques with RecyclerView. Custo

Satoru Fujiwara 601 Nov 29, 2022
Android LiquidSwipe Library

LiquidSwipe Android LiquidSwipe Library Default Touch Interactive LiquidSwipe is a viewpager library that can be used to make awesome onboarding desig

Chrisvin Jem 837 Jan 2, 2023
Android library to display a few images in one ImageView like avatar of group chat. Made by Stfalcon

MultiImageView Library for display a few images in one MultiImageView like avatar of group chat Who we are Need iOS and Android apps, MVP development

Stfalcon LLC 468 Dec 9, 2022
Android library to create complex multi-state animations.

MultiStateAnimation Android library to create complex multi-state animations. Overview A class that allows for complex multi-state animations using An

Keepsafe 405 Nov 11, 2022