Android - File Chooser modules cannot show directories and files inside storage in KitKat -


i want application load file file chooser. i'd tried modules implements it, strangely kitkat rooted phone, , unrooted earlier version can read directories , files inside storage, unrooted kitkat version cannot read inside storage.

here's module tried , code used :

android-file-chooser

intent intent = new intent(this, filechooser.class); arraylist<string> extensions = new arraylist<>(); extensions.add(".csv"); intent.putstringarraylistextra("filterfileextension", extensions); startactivityforresult(intent, 0);` 

afiledialog

intent intent = new intent(this, filechooseractivity.class); intent.putextra(filechooseractivity.input_start_folder, environment.getexternalstoragedirectory()); intent.putextra(filechooseractivity.input_regex_filter, ".*csv|.*csv"); this.startactivityforresult(intent, 0); 

also, here's permissions used inside androidmanifest

<uses-permission android:name="android.permission.camera" />  <uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.camera.autofocus" />  <uses-permission android:name="android.permission.read_phone_state" /> <uses-permission     android:name="android.permission.write_external_storage"     android:maxsdkversion="18" /> <uses-permission     android:name="android.permission.read_external_storage"     android:maxsdkversion="18" /> 

no errors found, when access storage, nothing can shown, when access root directory, seems normal in every phone.

is there way fix or better library / modules support recent version of android ?

edit solution : ish, attribute android:maxsdkversion can make application goes on trouble. should not using attribute. codes okay


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -