├── .gitignore ├── .idea ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── dictionaries │ └── zhangzhongping.xml ├── encodings.xml ├── gradle.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── gather │ │ └── kuaisu │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── gather │ │ │ └── kuaisu │ │ │ └── MainActivity.java │ └── res │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── gather │ └── kuaisu │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── quickscan ├── .gitignore ├── .idea │ ├── compiler.xml │ ├── copyright │ │ └── profiles_settings.xml │ ├── dictionaries │ │ └── zhangzhongping.xml │ ├── encodings.xml │ ├── gradle.xml │ ├── misc.xml │ ├── modules.xml │ ├── runConfigurations.xml │ └── workspace.xml ├── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── local.properties ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── duyin │ │ └── quickscan │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── duyin │ │ │ └── quickscan │ │ │ ├── QuickScanManager.java │ │ │ ├── api │ │ │ ├── QuickScanApi.java │ │ │ ├── QuickScanListener.java │ │ │ ├── QuickScanService.java │ │ │ └── RxUtlis │ │ │ │ └── RxSubscriber.java │ │ │ └── baen │ │ │ └── ScanResult.java │ └── res │ │ └── values │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── duyin │ └── quickscan │ └── ExampleUnitTest.java └── 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/dictionaries/zhangzhongping.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.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 | Abstraction issuesJava 39 | 40 | 41 | Android 42 | 43 | 44 | Android > Lint > Accessibility 45 | 46 | 47 | Android > Lint > Correctness 48 | 49 | 50 | Android > Lint > Correctness > Messages 51 | 52 | 53 | Android > Lint > Internationalization 54 | 55 | 56 | Android > Lint > Internationalization > Bidirectional Text 57 | 58 | 59 | Android > Lint > Performance 60 | 61 | 62 | Android > Lint > Security 63 | 64 | 65 | Android > Lint > Usability 66 | 67 | 68 | Android > Lint > Usability > Icons 69 | 70 | 71 | Android > Lint > Usability > Typography 72 | 73 | 74 | Assignment issuesGroovy 75 | 76 | 77 | Assignment issuesJava 78 | 79 | 80 | C/C++ 81 | 82 | 83 | Class metricsJava 84 | 85 | 86 | Class structureJava 87 | 88 | 89 | Cloning issuesJava 90 | 91 | 92 | Code maturity issuesJava 93 | 94 | 95 | Code style issuesJava 96 | 97 | 98 | Concurrency annotation issuesJava 99 | 100 | 101 | Control FlowGroovy 102 | 103 | 104 | Control flow issuesJava 105 | 106 | 107 | CorrectnessLintAndroid 108 | 109 | 110 | Data flow analysisC/C++ 111 | 112 | 113 | Data flow issuesJava 114 | 115 | 116 | Declaration redundancyJava 117 | 118 | 119 | DeclarationGroovy 120 | 121 | 122 | Dependency issuesJava 123 | 124 | 125 | Encapsulation issuesJava 126 | 127 | 128 | Error handlingGroovy 129 | 130 | 131 | Error handlingJava 132 | 133 | 134 | FunctionsC/C++ 135 | 136 | 137 | GPath inspectionsGroovy 138 | 139 | 140 | General 141 | 142 | 143 | GeneralC/C++ 144 | 145 | 146 | GeneralJava 147 | 148 | 149 | Google Cloud Endpoints 150 | 151 | 152 | Groovy 153 | 154 | 155 | Inheritance issuesJava 156 | 157 | 158 | Initialization issuesJava 159 | 160 | 161 | Internationalization issuesJava 162 | 163 | 164 | J2ME issuesJava 165 | 166 | 167 | JSON 168 | 169 | 170 | JUnit issuesJava 171 | 172 | 173 | Java 174 | 175 | 176 | Java language level issuesJava 177 | 178 | 179 | Java language level migration aidsJava 180 | 181 | 182 | JavaBeans issuesJava 183 | 184 | 185 | Javadoc issuesJava 186 | 187 | 188 | LintAndroid 189 | 190 | 191 | Logging issuesJava 192 | 193 | 194 | Memory issuesJava 195 | 196 | 197 | Method MetricsGroovy 198 | 199 | 200 | Method metricsJava 201 | 202 | 203 | Modularization issuesJava 204 | 205 | 206 | Naming ConventionsGroovy 207 | 208 | 209 | Naming conventionsJava 210 | 211 | 212 | Numeric issuesJava 213 | 214 | 215 | OtherGroovy 216 | 217 | 218 | Packaging issuesJava 219 | 220 | 221 | Pattern Validation 222 | 223 | 224 | Performance issuesJava 225 | 226 | 227 | Portability issuesJava 228 | 229 | 230 | Potentially confusing code constructsGroovy 231 | 232 | 233 | Probable bugsGroovy 234 | 235 | 236 | Probable bugsJava 237 | 238 | 239 | Resource management issuesJava 240 | 241 | 242 | Security issuesJava 243 | 244 | 245 | Serialization issuesJava 246 | 247 | 248 | TestNGJava 249 | 250 | 251 | Threading issuesGroovy 252 | 253 | 254 | Threading issuesJava 255 | 256 | 257 | Visibility issuesJava 258 | 259 | 260 | XML 261 | 262 | 263 | toString() issuesJava 264 | 265 | 266 | 267 | 268 | Android 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 296 | 297 | 298 | 299 | 300 | 301 | 306 | 307 | 308 | 309 | 310 | 311 | 1.8 312 | 313 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 329 | 330 | 331 | 332 | 333 | 334 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # QuickScan 2 | 手机文件快速扫描 3 | 基于getContentResolver实现手机文件扫描 4 | 5 | 1.使用技术 rxjava rxandroid material-dialogs 6 | 7 | 8 | public void button(View view){ 9 | QuickScanManager.getQuickScanManager().Init(this).getAllResult(editText.getText().toString(), new QuickScanManager.OnResultListener() { 10 | @Override 11 | public void ScanSuccess(List lists) { 12 | list.clear(); 13 | for(ScanResult scanResult:lists){ 14 | list.add(scanResult.getName()); 15 | } 16 | arrayAdapter.notifyDataSetChanged(); 17 | } 18 | 19 | @Override 20 | public void ScanError(String msg) { 21 | Toast.makeText(getApplicationContext(),msg,0).show(); 22 | } 23 | }); 24 | } 25 | 26 | @Override 27 | protected void onDestroy() { 28 | super.onDestroy(); 29 | QuickScanManager.getQuickScanManager().remove(); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 24 5 | buildToolsVersion "24.0.2" 6 | defaultConfig { 7 | applicationId "com.gather.kuaisu" 8 | minSdkVersion 14 9 | targetSdkVersion 22 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(dir: 'libs', include: ['*.jar']) 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:24.2.0' 28 | testCompile 'junit:junit:4.12' 29 | compile project(path: ':quickscan') 30 | } 31 | -------------------------------------------------------------------------------- /app/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 /Users/zhangzhongping/Library/Android/sdk/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 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/gather/kuaisu/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.gather.kuaisu; 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.gather.kuaisu", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/gather/kuaisu/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.gather.kuaisu; 2 | 3 | import android.support.v7.app.AppCompatActivity; 4 | import android.os.Bundle; 5 | import android.view.View; 6 | import android.widget.ArrayAdapter; 7 | import android.widget.EditText; 8 | import android.widget.ListView; 9 | import android.widget.Toast; 10 | 11 | import com.duyin.quickscan.QuickScanManager; 12 | import com.duyin.quickscan.baen.ScanResult; 13 | 14 | import java.util.ArrayList; 15 | import java.util.List; 16 | 17 | public class MainActivity extends AppCompatActivity { 18 | private EditText editText; 19 | private ListView listView; 20 | private List list = new ArrayList<>(); 21 | private ArrayAdapter arrayAdapter; 22 | @Override 23 | protected void onCreate(Bundle savedInstanceState) { 24 | super.onCreate(savedInstanceState); 25 | setContentView(R.layout.activity_main); 26 | editText = (EditText) findViewById(R.id.editText); 27 | listView = (ListView) findViewById(R.id.list_item); 28 | arrayAdapter = new ArrayAdapter(this, android.R.layout.simple_expandable_list_item_1,list); 29 | listView.setAdapter(arrayAdapter); 30 | 31 | } 32 | public void button(View view){ 33 | QuickScanManager.getQuickScanManager().Init(this).getAllResult(editText.getText().toString(), new QuickScanManager.OnResultListener() { 34 | @Override 35 | public void ScanSuccess(List lists) { 36 | list.clear(); 37 | for(ScanResult scanResult:lists){ 38 | list.add(scanResult.getName()); 39 | } 40 | arrayAdapter.notifyDataSetChanged(); 41 | } 42 | 43 | @Override 44 | public void ScanError(String msg) { 45 | Toast.makeText(getApplicationContext(),msg,0).show(); 46 | } 47 | }); 48 | } 49 | 50 | @Override 51 | protected void onDestroy() { 52 | QuickScanManager.getQuickScanManager().remove(); 53 | super.onDestroy(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 16 | 17 |