├── .gitignore ├── .idea ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── gradle.xml ├── misc.xml ├── modules.xml └── runConfigurations.xml ├── README.md ├── appsample ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── necistudio │ │ └── filepickerdocumentlibrary │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── necistudio │ │ │ └── filepickerdocumentlibrary │ │ │ └── MainActivity.java │ └── res │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── github.png │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── necistudio │ └── filepickerdocumentlibrary │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── library ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── ic_create-web.png │ ├── java │ └── com │ │ └── necistudio │ │ └── libarary │ │ ├── FilePickerActivity.java │ │ ├── adapter │ │ ├── FilePickerAdapter.java │ │ └── FilterAdapter.java │ │ ├── cursors │ │ ├── DocScannerTask.java │ │ └── loadercallback │ │ │ └── FileResultCallback.java │ │ ├── item │ │ ├── BaseFile.java │ │ └── Document.java │ │ ├── utils │ │ ├── FilePickerConst.java │ │ ├── MediaStoreHelper.java │ │ ├── PermissionUtils.java │ │ └── Utils.java │ │ └── view │ │ └── FilterFragment.java │ └── res │ ├── drawable │ ├── ic_excel.png │ ├── ic_pdf.png │ ├── ic_ppt.png │ ├── ic_txt.png │ └── ic_word.png │ ├── layout │ ├── activitymain.xml │ ├── fragmentfilter.xml │ ├── item_document.xml │ └── item_filter.xml │ ├── mipmap-hdpi │ └── ic_create.png │ ├── mipmap-mdpi │ └── ic_create.png │ ├── mipmap-xhdpi │ └── ic_create.png │ ├── mipmap-xxhdpi │ └── ic_create.png │ ├── mipmap-xxxhdpi │ └── ic_create.png │ └── values │ ├── colors.xml │ ├── layout.xml │ └── strings.xml └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Android - FilePickerFilter Library 2 | 3 |

4 | 5 |

6 | 7 | ``` 8 | repositories { 9 | jcenter() 10 | maven { url 'https://jitpack.io' } 11 | } 12 | ``` 13 | ``` 14 | dependencies { 15 | compile 'com.github.aerdy:Android-FilePickerFilterLibrary:-SNAPSHOT' 16 | } 17 | 18 | ``` 19 | ### Support Android Version 20 | ``` 21 | minSdkVersion 15 22 | ``` 23 | 24 | ``` 25 | Intent intent = new Intent(getApplicationContext(),FilePickerActivity.class); 26 | startActivityForResult(intent, idresult); 27 | ``` 28 | ``` 29 | @Override 30 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { 31 | super.onActivityResult(requestCode, resultCode, data); 32 | if (requestCode == 1) { 33 | if (resultCode == Activity.RESULT_OK) { 34 | String path = data.getStringExtra("path"); 35 | txtPath.setText(path); 36 | Log.e("data",path); 37 | }else{ 38 | Log.e("data","cance"); 39 | } 40 | } 41 | } 42 | ``` 43 | # Screenshot 44 | 45 |

46 | 47 |

48 |

49 | 50 |

51 |

52 | 53 |

54 | 55 | ##License 56 | ``` 57 | Copyright 2020 Necis Studio 58 | 59 | Licensed under the Apache License, Version 2.0 (the "License"); 60 | you may not use this file except in compliance with the License. 61 | You may obtain a copy of the License at 62 | 63 | http://www.apache.org/licenses/LICENSE-2.0 64 | 65 | Unless required by applicable law or agreed to in writing, software 66 | distributed under the License is distributed on an "AS IS" BASIS, 67 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 68 | See the License for the specific language governing permissions and 69 | limitations under the License. 70 | ``` 71 | -------------------------------------------------------------------------------- /appsample/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /appsample/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.2" 6 | defaultConfig { 7 | applicationId "com.necistudio.filepickerdocumentlibrary" 8 | minSdkVersion 15 9 | targetSdkVersion 25 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(include: ['*.jar'], dir: 'libs') 24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | compile 'com.android.support:appcompat-v7:25.2.0' 28 | compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha9' 29 | testCompile 'junit:junit:4.12' 30 | compile project(':library') 31 | } 32 | -------------------------------------------------------------------------------- /appsample/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/vim/sdk-linux/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /appsample/src/androidTest/java/com/necistudio/filepickerdocumentlibrary/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.necistudio.filepickerdocumentlibrary; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.necistudio.filepickerdocumentlibrary", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /appsample/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /appsample/src/main/java/com/necistudio/filepickerdocumentlibrary/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.necistudio.filepickerdocumentlibrary; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.os.Bundle; 7 | import android.util.Log; 8 | import android.view.View; 9 | import android.widget.Button; 10 | import android.widget.TextView; 11 | 12 | import com.necistudio.libarary.FilePickerActivity; 13 | 14 | public class MainActivity extends AppCompatActivity { 15 | 16 | private Button btnPick; 17 | private TextView txtPath; 18 | 19 | @Override 20 | protected void onCreate(Bundle savedInstanceState) { 21 | super.onCreate(savedInstanceState); 22 | setContentView(R.layout.activity_main); 23 | btnPick = (Button) findViewById(R.id.btnPick); 24 | txtPath = (TextView)findViewById(R.id.txtPath); 25 | btnPick.setOnClickListener(new View.OnClickListener() { 26 | @Override 27 | public void onClick(View v) { 28 | Intent intent = new Intent(getApplicationContext(),FilePickerActivity.class); 29 | startActivityForResult(intent, 1); 30 | } 31 | }); 32 | } 33 | 34 | @Override 35 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { 36 | super.onActivityResult(requestCode, resultCode, data); 37 | if (requestCode == 1) { 38 | if (resultCode == Activity.RESULT_OK) { 39 | String path = data.getStringExtra("path"); 40 | txtPath.setText(path); 41 | Log.e("data",path); 42 | }else{ 43 | Log.e("data","cance"); 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /appsample/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 23 | 31 |