Giter VIP home page Giter VIP logo

filepickerlibrary's Introduction

About Me

Hi there 👋 🤓 I'm Paul, a software engineer based out of the United States.

My interests include:

  • Open source software
  • High performance computing/code
  • Multi-threading
  • GPGPU
  • 2D/3D graphics
  • UI/UX Design

I work on a wide variety of projects, most of them open source. I've benefited a great deal from open source software, so I do my best to give back where I can. Some notable projects I have contributed to:

Additionally, below are some projections I'm a active maintainer of:

🛠️ Languages and Tools

android c cplusplus csharp windows flutter git jekyll kotlin linux visual-studio sourcetree github intellij gradle qt vscode windows

💻 Design Tools

figma figma

Keep in touch


🔥 Stats

github-stats GitHub Streak
lang-stats

filepickerlibrary's People

Contributors

alirezaaa avatar developerpaul123 avatar fmeneuhe avatar ivied avatar jasontanabe avatar meness avatar mkurutin avatar psh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filepickerlibrary's Issues

Update to full Material Design and change to a more fluid API

  • Use a navigation drawer for different levels of storage (i.e. SD card, google drive, dropbox...)
  • Collapsable toolbar, floating action button...
  • More fluid API, no more creating intents and passing extras. Reduce this boiler plate code with simple static builders (i.e. FilePicker.Builder(this).returnDirectory().build());

Dependency on materialfabmenu cannot be resolved

Hello,

if I add the following to my module build.gradle:

    compile 'com.github.developerpaul123.filepickerlibrary:library:1.3'

and the following to my project build.gradle:

allprojects {
repositories {
jcenter()
mavenCentral()
maven {
url "https://jitpack.io"
}
}
}

I get an error during my build, saying:

Error:A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_fullDebugCompile'.
Could not find com.github.developerpaul123.filepickerlibrary:materialfabmenu:1.3.
Searched in the following locations:
https://jcenter.bintray.com/com/github/developerpaul123/filepickerlibrary/materialfabmenu/1.3/materialfabmenu-1.3.pom
https://jcenter.bintray.com/com/github/developerpaul123/filepickerlibrary/materialfabmenu/1.3/materialfabmenu-1.3.jar
https://repo1.maven.org/maven2/com/github/developerpaul123/filepickerlibrary/materialfabmenu/1.3/materialfabmenu-1.3.pom
https://repo1.maven.org/maven2/com/github/developerpaul123/filepickerlibrary/materialfabmenu/1.3/materialfabmenu-1.3.jar
https://jitpack.io/com/github/developerpaul123/filepickerlibrary/materialfabmenu/1.3/materialfabmenu-1.3.pom
https://jitpack.io/com/github/developerpaul123/filepickerlibrary/materialfabmenu/1.3/materialfabmenu-1.3.jar
file:/C:/Software/AndroidSdk/extras/android/m2repository/com/github/developerpaul123/filepickerlibrary/materialfabmenu/1.3/materialfabmenu-1.3.pom
file:/C:/Software/AndroidSdk/extras/android/m2repository/com/github/developerpaul123/filepickerlibrary/materialfabmenu/1.3/materialfabmenu-1.3.jar
file:/C:/Software/AndroidSdk/extras/google/m2repository/com/github/developerpaul123/filepickerlibrary/materialfabmenu/1.3/materialfabmenu-1.3.pom
file:/C:/Software/AndroidSdk/extras/google/m2repository/com/github/developerpaul123/filepickerlibrary/materialfabmenu/1.3/materialfabmenu-1.3.jar

It seems that materialfabmenu cannot be found. What can I do about it?

Best regards,

Joerg

Major bug: NPE when opening

I have added the following code:

    Intent filePickerIntent = new Intent(this, FilePickerActivity.class);
    filePickerIntent.putExtra(FilePickerActivity.REQUEST_CODE, FilePickerActivity.REQUEST_FILE);
    startActivityForResult(filePickerIntent, FilePickerActivity.REQUEST_DIRECTORY);

When I click the button the executes this code, I get an exception:

10-19 12:29:41.797  E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #4
10-19 12:29:41.797  E/AndroidRuntime: java.lang.RuntimeException: An error occured while executing doInBackground()
10-19 12:29:41.797  E/AndroidRuntime:     at android.os.AsyncTask$3.done(AsyncTask.java:299)
10-19 12:29:41.797  E/AndroidRuntime:     at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
10-19 12:29:41.797  E/AndroidRuntime:     at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
10-19 12:29:41.797  E/AndroidRuntime:     at java.util.concurrent.FutureTask.run(FutureTask.java:239)
10-19 12:29:41.797  E/AndroidRuntime:     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
10-19 12:29:41.797  E/AndroidRuntime:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
10-19 12:29:41.797  E/AndroidRuntime:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
10-19 12:29:41.797  E/AndroidRuntime:     at java.lang.Thread.run(Thread.java:856)
10-19 12:29:41.797  E/AndroidRuntime:  Caused by: java.lang.NullPointerException
10-19 12:29:41.797  E/AndroidRuntime:     at com.devpaul.filepickerlibrary.adapter.FileListAdapter$GetFileSizeTask.getDirectorySize(FileListAdapter.java:386)
10-19 12:29:41.797  E/AndroidRuntime:     at com.devpaul.filepickerlibrary.adapter.FileListAdapter$GetFileSizeTask.doInBackground(FileListAdapter.java:372)
10-19 12:29:41.797  E/AndroidRuntime:     at com.devpaul.filepickerlibrary.adapter.FileListAdapter$GetFileSizeTask.doInBackground(FileListAdapter.java:358)
10-19 12:29:41.797  E/AndroidRuntime:     at android.os.AsyncTask$2.call(AsyncTask.java:287)
10-19 12:29:41.797  E/AndroidRuntime:     at java.util.concurrent.FutureTask.run(FutureTask.java:234)
10-19 12:29:41.797  E/AndroidRuntime:     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) 
10-19 12:29:41.797  E/AndroidRuntime:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 
10-19 12:29:41.797  E/AndroidRuntime:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 
10-19 12:29:41.797  E/AndroidRuntime:     at java.lang.Thread.run(Thread.java:856) 

This is a major bug as I can't use the library.

What should I do?

Fatal Exception: java.lang.RuntimeException

One of my users got this error. Can you add a try..catch to avoid exception when doing non-essential tasks? For example getting the size.

Fatal Exception: java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:299)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
at java.util.concurrent.FutureTask.run(FutureTask.java:239)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:856)
Caused by java.lang.NullPointerException
at com.devpaul.filepickerlibrary.adapter.FileListAdapter$GetFileSizeTask.a(SourceFile:386)
at com.devpaul.filepickerlibrary.adapter.FileListAdapter$GetFileSizeTask.a(SourceFile:372)
at com.devpaul.filepickerlibrary.adapter.FileListAdapter$GetFileSizeTask.doInBackground(SourceFile:358)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:856)

Open/Select Bar not showing

It doesn't matter whether if open the Picker in Dialog or Activity the Bottom Bar to Open/Select a File/Directory is not showing.

Can't compile project after updating to 2.0.1

Holla...so i have a very tricky issue. I updated my app to use the latest version of this library using the gradle dependency provided, and afterwards, i first had conflicts with the minSdkVersion being higher than my apps' own. i checked and found out the minSdkVersion on the both this library and your materialLibrary (which this library also uses) are both 16, even though your readme stated it was 14. So i did tools:overrideLibrary and that escaped that problem but then when trying to compile it complains of a duplicate file in the drawable-hdpi folder: fab_bg_mini.png. this file is apparently present in two of the libraries you use (filepickerlibrary and materialLibrary). I dont know if there is a way i can fix this.

Weird behavior for FilePickerActivity.REQUEST_CODE!

Hi,

I'm using following codes and I see weird behavior.

Note: I'm using the latest version and I'm testing on API 22. The file I'm trying to select is a PDF.
Note: I'm using FileType.NONE because I want to give users the option to select any file.

 Intent intent = new Intent(context, FilePickerActivity.class);
        intent.putExtra(FilePickerActivity.SCOPE_TYPE, FileScopeType.ALL);
        intent.putExtra(FilePickerActivity.REQUEST_CODE, Constants.RequestCodes.PICK_FILE.ordinal());
        intent.putExtra(FilePickerActivity.INTENT_EXTRA_COLOR_ID, R.color.accent);
        intent.putExtra(FilePickerActivity.MIME_TYPE, FileType.NONE);

Constants.RequestCodes is an enum. When I write Constants.RequestCodes.PICK_FILE.ordinal() for the FilePickerActivity.REQUEST_CODE it says 'select a directory' but when I change it to Constants.RequestCodes.PICK_FILE (I mean remove the ordinal()) it says 'select a .null file'.

I think the request code doesn't seem right because that must just be an integer and nothing more.

Grid functionality with Thumbnail?

I have used this library in my recent projects. It's way better than any other available. I just want to request a feature : "GridView" VIEWS of files with "Thumbnail". Currently it provides list of files which can be improved by providing Grids of available Files. Thanks for this great work

Add direct color

Hi,
It would be nice the possibility to add directly the color for the fab button and theme. Not only the resource id, the color itself.
Thanks

Fatal Exception: java.lang.NullPointerException: Attempt to get length of null array

A user with Android 6.0 got this error:

Fatal Exception: java.lang.NullPointerException: Attempt to get length of null array
at com.devpaul.filepickerlibrary.FilePickerActivity$UpdateFilesTask.fileArray(SourceFile:649)
at com.devpaul.filepickerlibrary.FilePickerActivity$UpdateFilesTask.onPostExecute(SourceFile:608)
at android.os.AsyncTask.finish(AsyncTask.java:651)
at android.os.AsyncTask.-wrap1(AsyncTask.java)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)

Add a Changelog

All repos should really have a changelog; this one is no exception.

Long time loading

Hi,
I am testing it. I have found on my samsung 10.1 tablet that in takes a while loading, it is long time with the message "Loading data...".
Is there any way I can do it faster?
Thanks

Fatal Exception: java.lang.IllegalStateException

I got this error from one of the users of my app (so I do not know what the user did to get this error):

Fatal Exception: java.lang.IllegalStateException: Cannot add header view to list -- setAdapter has already been called.
at android.widget.ListView.addHeaderView(ListView.java:264)
at android.widget.ListView.addHeaderView(ListView.java:293)
at com.devpaul.filepickerlibrary.FilePickerActivity$UpdateFilesTask(SourceFile:650)
at com.devpaul.filepickerlibrary.FilePickerActivity$UpdateFilesTask.onPostExecute(SourceFile:608)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5279)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(NativeStart.java)

FileListAdapter

The adapter doesn't correctly render lists when using the directory only scope. This needs to be fixed.

Crash with invalid image file

In the presence of an image file that is invalid, the code crashes. mBitmap is null in:

com.devpaul.filepickerlibrary.adapter.FileListAdapter$BitmapWorkerTask.doInBackground(FileListAdapter.java:215)

To reproduce, do: adb shell "touch /mnt/sdcard/invalid.png", open the picker, and browse to the sdcard location.

File list is not displayed on Android 6.0 and targetSdkVersion < 23

hi,
I'm using your library within an application that runs on Android 6.0 but has an older targetSdkVersion=21. When I send the intent to open FilePickerActivity it is displayed empty with no files or folders in the list.
Some debugging showed that FilePickerActivity.init() method is not being called on my device. Looks like this method is responsible for setting this.curDirectory to list files from.
After some googling I found the root cause of the issue here:

If the device is running Android 5.1 (API level 22) or lower, or the app's targetSdkVersion is 22 or lower, the system asks the user to grant the permissions at install time.

Getting above the parent directory

It is possible to get above the parent directory, which in the default case is storage/emulated/0 by clicking on a folder and then quickly pressing the navUpButton multiple times. You can then get to the root directory and from here crash the Activity by clicking on anything the user doesn't have permissions to access.

Error:Could not find com.afollestad:material-dialogs:0.6.7.2.

When I add the module, type gradle options with this project and sync Gradle in Android Studio, gives me this error:
2015-06-29 10:56:55,013 [6772968] INFO - radle.project.ProjectSetUpTask - Could not find com.afollestad:material-dialogs:0.6.7.2.
Searched in the following locations:
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/afollestad/material-dialogs/0.6.7.2/material-dialogs-0.6.7.2.pom
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/afollestad/material-dialogs/0.6.7.2/material-dialogs-0.6.7.2.jar
https://jcenter.bintray.com/com/afollestad/material-dialogs/0.6.7.2/material-dialogs-0.6.7.2.pom
https://jcenter.bintray.com/com/afollestad/material-dialogs/0.6.7.2/material-dialogs-0.6.7.2.jar
https://repo1.maven.org/maven2/com/afollestad/material-dialogs/0.6.7.2/material-dialogs-0.6.7.2.pom
https://repo1.maven.org/maven2/com/afollestad/material-dialogs/0.6.7.2/material-dialogs-0.6.7.2.jar
Required by:
:projectX:unspecified > com.github.developerpaul123.filepickerlibrary:library:1.3

I saw in other project 0.6.7.2 has been remove, replacing by 0.7.2.8
Can be this the issue?

Exception: Cannot add header view to list -- setAdapter has already been called.

Hi,

10-21 18:20:40.586  31540-31540/com.collect_up.c_up E/AndroidRuntime﹕ FATAL EXCEPTION: main
    java.lang.IllegalStateException: Cannot add header view to list -- setAdapter has already been called.
            at android.widget.ListView.addHeaderView(ListView.java:265)
            at android.widget.ListView.addHeaderView(ListView.java:294)
            at com.devpaul.filepickerlibrary.FilePickerActivity$UpdateFilesTask.onPostExecute(FilePickerActivity.java:670)
            at com.devpaul.filepickerlibrary.FilePickerActivity$UpdateFilesTask.onPostExecute(FilePickerActivity.java:628)
            at android.os.AsyncTask.finish(AsyncTask.java:631)
            at android.os.AsyncTask.access$600(AsyncTask.java:177)
            at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:5419)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:525)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
            at dalvik.system.NativeStart.main(Native Method)

The above exception will be thrown sometimes. Please help me to fix that. Thanks.

Error:(28, 13) Failed to resolve: com.github.developerpaul123.filepickerlibrary:library:1.0.0

As the title says, I get this error when attempting to sync with gradle since I upgraded from Android Studio 1.3 to 1.4.

Error:(28, 13) Failed to resolve: com.github.developerpaul123.filepickerlibrary:library:1.0.0

These are my gradle settings:

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
enforceUniquePackageName = false
defaultConfig {
applicationId "com.me.me.monapp"
minSdkVersion 21
targetSdkVersion 23
versionCode 2
versionName "2"

}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'com.android.support:percent:23.1.0'
compile 'com.github.developerpaul123.filepickerlibrary:library:1.0.0'
compile 'com.jcraft:jsch:0.1.53'
compile 'com.android.support:support-v13:23.1.0'
}

repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}

java.lang.IllegalStateException: Cannot add header view to list -- setAdapter has already been called.

When i open a directory and then touch the back button, this Exception is catched

java.lang.IllegalStateException: Cannot add header view to list -- setAdapter has already been called.
at android.widget.ListView.addHeaderView(ListView.java:261)
at android.widget.ListView.addHeaderView(ListView.java:290)
at com.devpaul.filepickerlibrary.FilePickerActivity$UpdateFilesTask.onPostExecute(FilePickerActivity.java:670)
at com.devpaul.filepickerlibrary.FilePickerActivity$UpdateFilesTask.onPostExecute(FilePickerActivity.java:628)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4867)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
at dalvik.system.NativeStart.main(Native Method)

Folder icon changes

When there are many files in a directory, after scrolling up/down, the folder icon changes and is replaced by the image of one pic in the folder. It seems to be is showing a recycled view and is not getting the correct icon.
Regards

Android Manifest merge conflict during gradle built

Error:(12, 9) Execution failed for task ':app:processDebugManifest'.

Manifest merger failed : Attribute application@icon value=(@drawable/dub_icon) from AndroidManifest.xml:12:9
is also present at com.github.developerpaul123.filepickerlibrary:library:1.0:16:9 value=(@drawable/ic_launcher)
Suggestion: add 'tools:replace="android:icon"' to element at AndroidManifest.xml:10:5 to override

I am getting the above error while adding your library via Gradle to my project. Please resolve this problem.

Option to disable directory size calculation

Hi Paul,
Can you add an option to disable the directory size calculation? It can improve a lot the performance, so we can choose either use it or not. For me this info is not relevant.
Thanks

It does not work with the Gradle

Hi, I tried to enter the code in my Gradle, compiles everything perfectly but when I enter these lines:

Intent filePickerIntent = new Intent(this, FilePickerActivity.class);
filePickerIntent.putIntExtra(FilePicker.REQUEST_CODE, FilePickerActivity.REQUEST_DIRECTORY);
startActivityForResult(filePickerIntent, FilePickerActivity.REQUEST_DIRECTORY);

I get errors on the words and REQUEST_DIRECTORY and filepicker. Why is this happening?
Thanks in advance

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.